Deploy a plain Node.js server on Light Cloud - no framework required, run as a container on port 8080 with lockfile-exact installs.
Deploy Node.js
A plain Node server - http.createServer, a WebSocket service, a worker with an HTTP health endpoint - deploys without any framework. Detection reads package.json, the generated image runs on Node 22, and the default port is 8080.
Serve it#
Listen on the routed port - PORT is set to it:
const http = require('http');
http
.createServer((req, res) => res.end('up'))
.listen(process.env.PORT || 8080);
server.listen(port) binds all interfaces by default. Write logs to stdout/stderr for runtime logs.
Build and start#
- Install follows your lockfile (
pnpm-lock.yaml,yarn.lock,package-lock.json) - exact installs with a lockfile present. - A
buildscript (TypeScript compile, bundling) runs during the image build via the build command. - The container starts your
startscript.
Configuration and database#
Read environment variables from process.env at startup - never bake them into the build. DATABASE_URL comes from the Credentials tab.