TerrordactylDesigns / boombot

Node.js powered Chat and DJ bot for Turntable.fm
http://terrordactyldesigns.github.com/boombot/
MIT License
24 stars 18 forks source link

Running from external hosting #5

Closed tinyrsn closed 11 years ago

tinyrsn commented 11 years ago

Hi,

I use appfog to run my bot. Appfog automatically runs a javascript file called app.js from the root directory. Previously, I was able to rename boombot.js to app.js, but now that its in a different directory I am no longer able to do this.

How can I have a script called app.js in the root directory start /bin/boombot?

Thanks, John

TerrordactylDesigns commented 11 years ago

I'll get you all set up tonight. I have an appfog acct as well I will test with.

TerrordactylDesigns commented 11 years ago

Add this to the bin\boombot file at the bottom: module.exports.bot = bot;

Then have app.js say: var boom = require('./bin/boombot').bot;

In theory it should run. If not, I'll look into it after work.

tinyrsn commented 11 years ago

Thanks for this! I figured out that by modifying the package.json file with

"scripts": { "test": "tap test/*.js", "start": "bin/boombot" },

I was able to make it start from the bin directory.

Thanks, John