Deploying to Nodejitsu

Hurray! I’m ready to deploy CrowdNotes!

(Is it done? No. Are apps ever done? No. Is it good enough to at least push it out into the world? Absolutely!)

With that in mind, last night I asked really nicely for an got a
super-exclusive invitation to try out Nodejitsu‘s extended beta. For this post, I’ve been following the Nodejitsu Handbook and hanging with the Nodejitsu guys in the #nodejitsu IRC channel.

  1. Install jitsu, the command-line bit of awesome that will allow you to deploy your code like magic:[code]npm install -g jitsu[/code]

  2. Confirm username/set password:[code]jitsu users confirm rockbot SOMESECRETCODE[/code]

Note: you’ll get the code via email when you get your invitation.

  • Login[code]jitsu login[/code]

  • Make sure that all the code I want to deploy is in one place (I created a special jitsu branch, in case I need to change anything)[code]git co -b jitsu[/code]

  • Deploy![code]jitsu deploy[/code]
  • Note: Since this was the first time I’d ever deployed an app to jitsu, my package.json file was modified to include a subdomain (crowdnotes), start script (app.js), and engine (v0.6.x).

  • Receive this error, resolve it by removing the following line from app.js (the last one):[js]console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);[/js]

  • Deploy again[code]jitsu deploy[/code]

  • Receive this error, resolve it by destroying the app on jitsu:[code]jitsu destroy apps application-name[/code]

  • Check to make sure no random apps showed up by accident[code]jitsu list[/code]

  • Deploy - third time’s the charm![code]jitsu deploy[/code]

  • Wait a few seconds, get the confirmation that it’s running, and check out!

  • Realize that there’s no database connected (whoops!) and have jitsu create a mongohq db for you[code]jitsu databases create mongo CrowdNotes[/code]

  • Update the connection information in app.js and redeploy the app (to accommodate your changes)[code]jitsu deploy[/code]

  • Go back to, play around, and do a little dance when it works like magic!

  • And that’s it! ISN’T THAT AWESOME?!

    nodejitsu logoI’m completely sold and in love with nodejitsu right now. Maybe it’s because setting it up was so easy. Or maybe it’s because even if I had some issues, the guys on IRC were SUPER quick to respond (really, I think I spent 15 minutes total, from start to finish). OR maybe it’s because CrowdNotes is alive!

    Yes, there are still things that need some tweaking, and more than a few things that need to be prettied up, and some functionality that needs some schnazzified, but overall - it’s up! It’s running!

    Go play!
    :-) (And let me know what you think!)

    Edit: Get involved in the Sandbox Event to send me your comments!!