A minimal HTTP server that returns JSON responses.
npm install
npm run build
npm startThe server listens on port 3000 by default. Set PORT to use another port:
PORT=8080 npm startGET / returns a JSON welcome message. Other paths return a JSON 404 response.
Build the production image from the repository root:
docker build -t node-typescript-hello-world:local .Run it with the default port:
docker run --rm -p 3000:3000 node-typescript-hello-world:localSet PORT to use a different port inside the container:
docker run --rm -e PORT=8080 -p 8080:8080 node-typescript-hello-world:local