Deployment Basics sounds simple, but these are the settings that decide whether a Node.js app becomes a stable hosted service or another fragile upload. The four that matter most are version, app root, startup file and environment variables.
This is not a deep server guide. It is the short reference a business owner, founder or junior developer should understand before asking hosting to run an app. If these basics are clear, support is faster. If they are vague, every later problem gets harder.
NinjaWeb handles this inside Node.js hosting setup: choose the runtime, map the folder, set the startup path, add production settings, test the domain and leave the app easier to own.
The Four-Setting Blueprint
Think of deployment as a small blueprint. The version says which runtime the app receives. The app root says which folder the host treats as the project. The startup file says what command or file starts the app. The environment variables say what the app is allowed to know in production.
- Version: the Node.js runtime selected on hosting.
- App root: the project folder the host should run.
- Startup: the file or npm script that starts the app.
- Variables: private production settings such as database URLs and API keys.
Version Is A Compatibility Choice
The version should not be picked casually. If the app was built and tested on one Node.js version, the hosting account should not silently run another unless somebody has tested the change. A mismatch can break syntax, packages or runtime behaviour.
Check package.json for an engines field. If it exists, use it as the starting point. If it does not, ask which version was used during development and document the production choice.
The rule is simple: choose a version you can explain later. Future support should not depend on memory.
App Root Is A Folder Decision
The app root tells hosting where the application begins. This should usually be the folder containing package.json, not a random parent folder and not a public asset folder. If the root is wrong, everything after it becomes suspicious.
A clean root makes install, startup and support easier. A messy root makes the host look in the wrong place and makes the next person wonder which files actually matter.
Startup Is The Run Command
The startup setting answers one practical question: what should the host run? Some apps start with server.js, some with app.js, some with index.js, and some through an npm script.
Do not confuse a development command with a production command. A local dev script may include watchers or hot reload behaviour. The hosted startup should be boring, stable and written down.
This is where app development handoff should be precise. The developer should name the startup path, not leave hosting support to guess from filenames.
Variables Are The Production Settings
Environment variables keep private and environment-specific settings out of public code. They might include APP_ENV, DATABASE_URL, API keys, email credentials, payment secrets or session settings.
A variable is not confirmed because it was typed into a panel. It is confirmed when the feature that needs it works on the live domain. If login, email, API calls or database access fail after deployment, variables should be checked early.
List the required variable names in the deployment notes, but do not expose the private values in public documentation or insecure files.
A Small Example Makes The Risk Clear
Imagine a small reporting dashboard. Locally, it works because the developer has Node.js installed, the database URL sits in a private file, and the app is started with a command they remember. On hosting, none of that is automatic. If the root points to the wrong folder, the host cannot find the app. If the startup command is wrong, the app never starts. If the database variable is missing, the dashboard loads but cannot show data.
That is why these four settings belong in the deployment record. They turn a fragile memory-based launch into something another operator can inspect. The app may still need future fixes, but support starts from known facts instead of a guessing session.
The Last Check Is Ownership
After version, root, startup and variables are set, restart the app and test the public URL over HTTPS. Then read the logs. A launch without a log check is only a guess.
The business should also know who owns these settings. If the app grows into workers, queues, heavier traffic or custom server requirements, then VPS hosting may become the better fit. But that decision should come from the app’s needs, not from panic.
The goal is not to memorise hosting jargon. The goal is to make the app supportable. When the four basics are visible, the app has a much better chance of staying live after the first successful upload.

