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.
- Install jitsu, the command-line bit of awesome that will allow you to deploy your code like magic:
npm install -g jitsu
- Confirm username/set password:
jitsu users confirm rockbot SOMESECRETCODE
Note: you’ll get the code via email when you get your invitation.
- 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)
git co -b jitsu
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):
console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);
- Deploy again
- Receive this error, resolve it by destroying the app on jitsu:
jitsu destroy apps application-name
- Check to make sure no random apps showed up by accident
- Deploy – third time’s the charm!
- Wait a few seconds, get the confirmation that it’s running, and check out http://crowdnotes.nodejitsu.com!
- Realize that there’s no database connected (whoops!) and have jitsu create a mongohq db for you
jitsu databases create mongo CrowdNotes
- Update the connection information in app.js and redeploy the app (to accommodate your changes)
- Go back to http://crowdnotes.nodejitsu.com, play around, and do a little dance when it works like magic!
And that’s it! ISN’T THAT AWESOME?!
I’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!
Edit: Get involved in the Sandbox Event to send me your comments!!