Nodejitsu and GitHub

I had an idea that I should be able to manage a public Node.js deployment entirely from within GitHub, without having to install a Unix virtual machine.

It turns out that Nodejitsu does exactly what I wanted-- but their documentation is a horror (at least for a newbie like me). It's actually just a few easy steps to connect the two.

You have to go to the Settings page on your GitHub project. Then click on the Service Hooks tab, then Nodejitsu.

Fill in your username and password, check Active, and click Update Settings.

If you switch over to Nodejitsu there will be a new app in your list of apps.

You can make a change in GitHub and it automatically appears in Nodejitsu.

Restart the app to make the changes appear.

Now I have to figure out how npm works over there, or if it does.

Update #1

  • I got stuck much earlier.

  • I tried to deploy my own repository, and entered my username and password, as above, but I keep getting a message saying that I am not me.

  • Here's an example.

  • I don't think this has anything to do with the username and password (esp because there's another error message for incorrect username and password). It's some kind of permissions thing, but I have no idea what needs configuring. About ready to look for another way to deploy. Oy.

Update #2

  • Never mind.

  • The script I deployed just did a console.log ("hello") and exited.

  • For some reason Nodejitsu sees that as an error and gives a mystifying error message. Par for the course for Unix software, imho.

  • On that theory, I deployed Brent's test server, the one that returns blue or green, and it works. For a little while at least this link will launch Brent's app.

Update #3

  • The next questions:

    • How do I do jQuery stuff in node? I want to use the same XML processing code on the server that I use in the client, if possible.

    • How do I do the equivalent of npm? I have to load the Amazon libraries. There must be a howto somewhere.

  • Notes

    • It looks like you specify the packages you need in the package.json file.

Update #4

  • The Nodejitsu app just wrote a file to an S3 bucket. (7:23PM, Niners up 3-0.)

  • I have it writing a new test file every time someone accesses the page. For some reason it writes two or three files for every hit. Maybe it's because my browser is looking for icon files or some other weird stuff. Probably.

  • Here's an example of one of the test files. (As with the other files it may disappear after a while.) And here's the source code of the server app that writes to S3.

  • Niners up 10-3.


Last built: Sat, Apr 12, 2014 at 2:48 PM

By Dave Winer, Sunday, January 19, 2014 at 12:04 PM. Pay no attention to the man behind the curtain.