Deploying SFW on Heroku using Node

By default, trying to push the Smallest Federated Wiki repo to Heroku runs using Sinatra. It didn’t work, so here’s how to deploy it using Node.js

  1. Clone the Smallest Federated Wiki repository and cd into it
  2. Remove the Gemfile
    • rm Gemfile
  3. Move the package.json file into the project root
    • mv server/express/package.json package.json
  4. Alter procfile to run the node server on the port given by heroku at the correct URL:
  5. Create a new Heroku app (assuming you have the heroku toolbelt installed)
    • heroku create your-app-name
  6. Push the app to heroku
    • git push heroku master

Hopefully after all the Heroku package management cruft is over you’ll have a successfully launched heroku app. You might have to run heroku scale:ps web=1 to actually get a web process running.

Potential Problems

As I/others come across problems, document them and their solutions here. Let me know if you follow these instructions and run up against errors! waterpigs.co.uk Barnaby Walters barnaby@waterpigs.co.uk.

Questions

  • Why not make a fork to do this? — I don’t really want to maintain a fork, and it’s not like making the changes is really difficult.
  • Why run using node+express instead of Sinatra+Ruby? — I tried that and heroku gave me a bunch of rubygems errors I didn’t understand.