Node JS

Instructions for connecting your NodeJS apps and deploying them on ToyStack

Step 1: Ensure your app is Dockerised

ToyStack uses docker to deploy your application and will look for a Dockerfile in the top-level of your project structure.

You can either use your own Dockerfile or use the following template:

FROM node:16

COPY package*.json ./

WORKDIR /opt/server/backend-test

COPY . .

RUN npm install
EXPOSE 8080
CMD [ "node", "index.js" ]

Step 2: Import your Git repository

Go to the ToyStack Dashboard and create a new project using your repository.

Step 3: Input environment variables

Please ensure the Framework Preset is set to DOCKER. The rest of the variables can be set as required for your project.

Also ensure the PORT number matches the one specified in your Dockerfile

For detailed instructions, please see the Environment Variables page.

Step 4: Deploy

Simply select the branch you want to deploy, its deployment validity and ToyStack will deploy it

Last updated