Runway
Runway is built and operated in the EU!

React

First steps

Let’s start a new react application. For the tutorial, we’ll use create-react-app which sets up a standard react-based app and demonstrate how easy it is to run it Runway.

Setup

Create a new application:

$ npx create-react-app my-app

This may take a couple of minutes, but once it’s done, you can test the app by changing into the my-app directory and running npm start.

$ cd my-app
$ runway app create

Configure a web server

When you push the app code, Runway will run npm run build which produces all the static assets required to run the app, but we’ll still be missing a web server.

One of the options is to add an Nginx (e.g. see the Angular tutorial), another option is to add a small JavaScript-based web server:

$ npm install serve
...

And re-configure how the app is started:

$ npm pkg set scripts.dev="react-scripts start"
$ npm pkg set scripts.start="serve -s build"

Hold on a second - we just changed two things:

$ runway app config set PORT=3000

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.

Congrats! You built a React app and it’s running on Runway! 🚀