How to deploy a Meteor app in Nodejitsu
As you already may know Nodejitsu is one of the best hosting providers for apps built on Node. But many developers that use Meteor framework were finding difficult to host their apps in Nodejitsu. Below is the guide on how to do it. In short you have to use “demeteorizer” package which converts a meteor app into a standard node.js application.
- Install demeteorizer usign npm:
$ [sudo] npm install -g demeteorizer
- Execute demeteorizer in your Meteor application folder:
$ demeteorizer -o package
This will create a folder called package, this will be your npm compatible package to deploy to Nodejitsu.
- Modify your package before deploy:
Edit your new package.json in the package folder and do the following:
Change engine version to 0.10.x (0.8.x will fail to start)
- Deploy your application, it will prompt for a subdomain to use in Nodejitsu.
$ jitsu deploy
If you are using MongoDB you’ll need to define the ENV variable with the connection string and restart the application.
$ jitsu env set MONGO_URL “mongodb://user:[email protected]:port/databasename?autoReconnect=true”
$ jitsu start