Running Node.js applications on Nodion

Learn more about how to run Node.js applications like Express on Nodion

Create a new application

To get started you can simply create a new application after signing in. You are able to choose between using our Git Integrations or uploading an archive that contains the source code. We provide sample repositories for Flask as well as Django to get you started quickly.

Create App Screenshot

Deploying with Buildpacks

Buildpacks will automatically detect that you are running a Node.js application if you have a package.json file in the root directory of your application. Please provide the desired Node.js version in this package.json file, the Node.js Buildpack will install all dependencies as well as the specified Node.js version.

It's necessary to set a PORT Environment Variable within your application settings. If this is not set, our load balancing system is not able to redirect to your application and an error will occur.

Release stage

If you need to run certain tasks when deploying you can use the release stage of the Procfile. The command provided there will be run right before spawning the new containers of that deployment. For example if you are using Sequelize you can run migrations with the release stage like this:

web: npm start
release: npx sequelize-cli db:migrateProcfile

Running Background Queues

With libraries like Bull you can easily run background processing tasks. With Nodion you can simply provide a worker start command with the worker type to run those Bull queues. For example:

web: node web.js
worker: node worker.js
release: npx sequelize-cli db:migrateProcfile

Bull require Redis to work. You can use our Managed Redis service to launch Redis instances.

Additional Packages

We support multiple Buildpack Builders, depending on which Builder you chose there are different packages pre-installed. You can use additional Buildpacks, like the FFmpeg Buildpack to install a specific package. In general, all Builders that are supported by Nodion are based on Ubuntu. That means you can also install any package by adding a Buildpack called apt and creating an Aptfile to provide a list of packages.

Connecting to a Database

You can create PostgreSQL or MariaDB instances with our Managed Database service and attach them directly to your application. Database credentials can be added through Environment Variables.