Node.js hosting
Serve an API, keep a queue consumer running, or execute a report once. Match the deployment to what your JavaScript process does after it starts.
GET /{
"service": "node-api",
"status": "ok"
}
Download the API example
What you can host with Node.js
An API at a public address
An Express app or a standard-library HTTP server can receive requests at the deployment’s HTTPS address. Keep the listener on the assigned port and pick a route with a predictable response to test each release.
Check an HTTP deploymentA background queue worker
Run a consumer that waits for jobs from your application. Record a job ID when work starts and finishes so a quiet queue and a stalled handler look different in Console.
Download the worker exampleScripts with a recorded outcome
Use a one-off deployment for a finite task such as producing a report or importing a batch. Run the script from Runs, inspect its exit status and keep the batch identifier with its output.
Download the report examplePackages and branch deployments
Use the lockfile that went through testing. Include the build tools your TypeScript project needs and connect the branch that should reach users. The deployment history records the revision delivered by GitHub.
Connect a release branchChoose a process type
An API waits for incoming requests. A worker stays alive between events, even when it has no public route. A one-off script finishes a unit of work and exits so you can inspect its result.
- Deploy Always-on worker on Spark
Always-on worker
Keep a queue consumer or event listener active. Its progress belongs in Console.
- Deploy HTTP app or API on Spark
HTTP app or API
Serve requests on the assigned port and publish an HTTPS address.
- Deploy One-off Node.js script on Spark
One-off Node.js script
Run a script on demand and keep its exit result and output.
Deploy and check your Node.js project
Bring the project root
Upload your files or connect a GitHub branch. Keep your entry file,
package.jsonand lockfile together. The downloadable HTTP example uses only the Node.js standard library.Set the startup command
Use
MAIN_FILE=index.mjsfor the API example. For a package with a lockfile and a start script, setRUN_COMMANDtonpm ci && npm start. Include the build step in that command if your project compiles TypeScript first.Exercise the actual workload
For HTTP, listen on
0.0.0.0andSERVER_PORT, then open the HTTPS address in Settings. For a worker, look for successive heartbeats in Console. For a one-off script, start the runner, select Run now in Runs and inspect the exit result.
Ship a new API response from GitHub
Use the downloadable API for a first release. Its GET / endpoint has a short JSON response, so you can check which revision is serving requests without exposing logs or credentials.
Trace a request that never reaches Node.jsEstablish the first response
Deploy the example and open the platform address in Settings. The root path returns a JSON object with service set to node-api and status set to ok. Save that response and URL for the next check.
Ship one observable change
Add a version field to the example response and push it to your connected branch. In Deploy, compare the commit in Recent deploys with the one you pushed. If a build fails, read the install or build error before changing the HTTP settings.
Verify the public route
Request the same root URL again and check for your version field. If a different path returns 404, verify that your app actually defines it. If the old version still answers, compare the running revision and the start command with your repository.
Node.js hosting plans
One account plan covers your deployments. Divide its memory, storage and CPU among the projects you run together.
| Plan | Memory | Storage | CPU | Deployments | File backup | History | Per month |
|---|---|---|---|---|---|---|---|
| Spark | 256 MB | 512 MB | 25% | 1 | Every hour | 24 hours | $0.00 |
| Relay | 1 GB | 5 GB | 50% | 2 | Every 15 minutes | 3 days | $2.25 |
| Circuit | 2 GB | 8 GB | 100% | 4 | Every 15 minutes | 7 days | $3.25 |
| Grid | 4 GB | 15 GB | 200% | 8 | Every 5 minutes | 14 days | $6.00 |
| Fleet | 8 GB | 25 GB | 250% | 12 | Every 1 minute | 30 days | $9.00 |
Spark1 deployment$0.00
- Memory
- 256 MB
- Storage
- 512 MB
- CPU
- 25%
- Deployments
- 1
- File backup
- Every hour
- History
- 24 hours
Relay2 deployments$2.25
- Memory
- 1 GB
- Storage
- 5 GB
- CPU
- 50%
- Deployments
- 2
- File backup
- Every 15 minutes
- History
- 3 days
Circuit4 deployments$3.25
- Memory
- 2 GB
- Storage
- 8 GB
- CPU
- 100%
- Deployments
- 4
- File backup
- Every 15 minutes
- History
- 7 days
Grid8 deployments$6.00
- Memory
- 4 GB
- Storage
- 15 GB
- CPU
- 200%
- Deployments
- 8
- File backup
- Every 5 minutes
- History
- 14 days
Fleet12 deployments$9.00
- Memory
- 8 GB
- Storage
- 25 GB
- CPU
- 250%
- Deployments
- 12
- File backup
- Every 1 minute
- History
- 30 days
Prices in USD before tax. A year costs the same as ten monthly payments.
Compare all plan featuresCan I use an existing Express or TypeScript project?
Yes, if its runtime dependencies and build fit the allocation. Keep the package manifest and lockfile with the source. For TypeScript, compile before starting the generated JavaScript entry point. An HTTP service must listen on the assigned port.
Can the API and worker deploy independently?
Yes. Create a separate deployment for each, even when they share a repository. Choose the HTTP profile for the API and the worker profile for the consumer. Give each its own startup command and resource allocation.
Why does Console say “listening” when my API is unreachable?
Check the HTTP profile, bind address and assigned port. A server listening on localhost is reachable only inside its deployment. Request a route the application defines. The API example handles GET / and returns 404 for other paths.
Which profile should I use for a data import?
Choose the one-off script profile if an import finishes and exits. Start the runner and use Run now for each batch. Print a batch identifier and number of records processed so retries are easy to trace.