Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 1.14 KB

File metadata and controls

62 lines (40 loc) · 1.14 KB

DEPLOYMENT

Guide to deploy the NodeJS Express backend into a production demo server.

For now this will be a small set of manual steps, but later we may want to automate this via the CI pipeline, by building the docker image and the mobile app binary for the release.

CLONE

git clone https://github.com/approov/quickstart-nodejs-express-token-check.git
cd quickstart-nodejs-express-token-check/servers/shapes-api

ENVIRONMENT

Copy the .env.example:

cp .env.example .env

The Approov secret

The v2/* endpoints are protected by the Approov Token, thus we need to set the Approov secret for nodejs-express-shapes.approov.io.

From your office computer, not the server, get the Approov secret with:

approov secret -get base64

Add it to the .env file:

APPROOV_BASE64_SECRET=approov-base64-encoded-secret-here

HOW TO RUN

Build the Docker Container

sudo docker-compose build

Bring the API up

sudo docker-compose up -d node

Bring the API down

sudo docker-compose down

Check the Logs

sudo docker-compose logs --follow --tail 20