This is a Node Express Quickstart for Nullstone. This is based on the Express official Hello World.
This uses the Nullstone official nullstone/node image.
- Create a public web app. (Remember
app-name
for later) - Provision
nullstone up --wait --block=<app-name> --env=<env-name>
- Build, push, and deploy
docker build -t express .
nullstone launch --source=express --app=<app-name> --env=<env-name>
You can run this project locally inside Docker or using node alone.
To use docker, this project contains docker-compose.yml
that runs with NODE_ENV=development
.
This setup ensures that using Docker doesn't inhibit typical development workflows:
- Dependencies are installed on boot of docker container
docker compose up
Visit http://localhost:9000.
Any time you change package.json
, you need to update your dependencies.
The dependencies will be installed on boot of the docker container; restart the container to update.
docker compose restart app
This app was generated following these steps.
yarn init
yarn add express
- Copy
app.js
from Hello World example.