How to deploy a Node.js app
- Upload your app's files over SSH or FTP.
- Open your Pressy and go to Node.js in the sidebar.
- Press Deploy an app.
- Fill in the four fields below.
- Press Deploy app.
| Field | What to put |
|---|---|
| Startup command | What runs, e.g. npm start |
| Working directory | Where it runs from; blank means your home folder |
| Start mode | Automatic restarts it if it crashes |
| Node version | Stable (recommended) tracks the latest LTS |
Making it reachable on your domain
Switch on Make this app reachable over HTTP, then put api in the
path box and the port your app listens on — usually 3000 — in the port box.
https://yourdomain.com/api then reaches it, on the same certificate as the
site.
The path takes letters, numbers and underscores, with hyphens, dots and slashes in the middle only, and no leading slash.
Allow WebSocket upgrades is a separate switch. Turn it on if your app uses WebSockets, or upgrade requests are dropped silently.
Checking it is running
Nothing reports run state, so read the log: press Load log, then Refresh. New output means it is alive.
To restart it, press Restart on your Pressy's overview — that restarts the container, and your site's PHP with it.
Removing it
Delete stops it immediately. You can deploy it again with the same settings at any time.
Didn’t solve it?
Write to us with your Pressy’s address and what you were doing when it went wrong. Answered by the people who built it.
Last updated