Javascript and NodeJS example project for ks-devops
A minimal HTTP server built with Node.js. It responds with Hello, World! on the root path and listens on port 8080 (configurable via the PORT environment variable).
npm ci --offline
npm startnpm testdocker build -t demo-javascript .
docker run -p 8080:8080 demo-javascriptThe container runs as an unprivileged user (65532:65532).
This repository ships with a local npm cache (.npm) and an .npmrc that points npm to it. In an offline environment you can run the standard workflow without network access:
npm ci --offline
npm test
npm startThe .npmrc file sets cache=.npm and prefer-offline=true, so npm ci will use the local cache by default.