Runway
Runway is built and operated in the EU!

Express.js

First steps

Let’s start by building a small app using the well-known express.js library for JavaScript/NodeJS.

Setup the project

Create a project folder:

$ mkdir ./my-app
$ cd my-app/

Install express.js as a dependency using npm:

$ npm install express --save
$ echo "node_modules" > .gitignore

Hello world!

Let’s create an app.js file with the following content (inspired by the express.js hello world example):

app.js
const express = require('express')
const app = express()
const port = process.env.port || 3000

app.get('/', (req, res) => {
  res.send('Hello World!')
})

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})

Define a start command in package.json:

$ npm pkg set scripts.start="node app.js"

You can test the app locally by running: npm run start and it will be available at http://localhost:3000/.

$ runway app create
$ runway app config set PORT=3000
$ git add -A
$ git commit -m "initial commit"

Deploy to Runway

runway app deploy

Run runway app open to see it live, or check the Runway UI. Check runway app logs if something’s off.

Congratulations, you deployed an express.js application to Runway! 🎉

Next steps