Deploy Express / Node.js
How nesly detects, builds and serves a Express / Node.js project — and the two commands that put it on a live URL.
Deploy Express / Node.js on nesly
A Express / Node.js project is built into a container and run as a server process.
nesly new node-postgres my-app
cd my-app
nesly addon add postgres
nesly deploy --yes
The first deploy creates the project and prints the live URL; after that,
nesly deploy is enough.
The node-postgres template is a complete,
readable starting point.
How detection sees it
- A Node project that is not a recognised frontend framework runs as a container: dependencies from your lockfile's package manager, started with your package.json start script.
- A Dockerfile in the project root always wins — the platform builds exactly what it says.
When detection is not what you want, say it yourself: build and start commands, root
directory and output directory live in nesly.toml
committed next to the code — see builds.
Worth knowing
- Listen on process.env.PORT and bind 0.0.0.0 — a server on localhost or a fixed port is invisible to the platform.
- Add a managed database with `nesly addon add postgres`; DATABASE_URL is injected on the next deploy.
-
Attach a managed database with
nesly addon add postgres(ormssql) — connection env vars are injected on the next deploy. -
When a deploy fails,
nesly diagnosereads the logs for you and names the fix.
Full walkthrough: get started. Custom domains, backups, GitHub deploys and the rest of the reference: nesly CLI.