Frage

I'm curious if anyone has any experience when running Geddy, if you can also run an additional resource, such as: https://github.com/AvianFlu/ntwitter

Would it be possible if you were to include the above via the package.json and reference it like:

var twitter = require('ntwitter');

var twit = new twitter({
  consumer_key: 'Twitter',
  consumer_secret: 'API',
  access_token_key: 'keys',
  access_token_secret: 'go here'
});

Then when you run geddy, it spawns another instance of itself, that would have access to models, etc, for saving tweets from the twitter streaming api? I know that I could just run it as a node server, then save the results to mongodb, but was hoping it's possible to start all of this and keep it within geddy.

Complete noob here when it comes to Geddy and Node.

War es hilfreich?

Lösung

One way to accomplish this is to create a Jake task that does your twitter streaming stuff, and run that through geddy.

Once you have the jake task written you can run it with 'geddy jake myTask'. The task will have access to models etc.

And you can start this task along with the geddy server to keep things neat.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top