Documentation


Migration to the new stack

What's new

The new stack brings a couple new features and many performance improvements:

  • Application logs and NPM build logs are available through the web console
  • Apps are restarted less often
  • MongoDB was migrated to version 3.0.x with oplog enabled
  • Start script is detected based on package.json
  • Changes to the apps are applied within seconds
  • Added support for many libraries and tools required during build such as ImageMagick, libjpeg, libpng and many others

Recommended approach

All new applications are by default created on the new stack. Apps running on the old stack can be identified by the url in format app-name.evennode.com. In case your application still runs on the old stack, below you can find the recommended approach for migration:

  1. Update your code to be compatible with changes described below
  2. Create a new free trial app
  3. Deploy your code to this new app
  4. Test if everything works ok
  5. In case everything works as expected and you're ready to migrate, update your custom domain CNAME entries and start using the new URL
  6. If you're on a paid plan, let us know at support@evennode.com — we'll migrate your plan to the new app
  7. The old app can be removed

Listen on new port

On the new stack your app should listen on port defined by environment variable process.env.PORT. See Hello World source for example how to configure your app.

MongoDB changes

MongoDB has been updated from version 2.6.x to version 3.0.x.
If you're using MongoDB from EvenNode, you should review your app whether it's compatible with MongoDB 3.0.x. See Compatibility changes in MongoDB 3.0 and General Compatibility Changes for more information.

We have also changed the APP_CONFIG environment variable. You should use process.env.APP_CONFIG.mongo.hostString variable to connect to MongoDB. See MongoDB in our docs for more info.

Start script changes

We automatically detect the start script based on your package.json. If your package.json defines a start script, it will be used instead of the old app.js file. See Main script for more info.

URL changes

After the migration, the url of your application will change.
In case you're using Custom domains, you should update your CNAME entries.