דלג לתוכן
Yasa

How do I run a Node.js app and connect it to a website?

Managed Node.js apps are separate processes for the selected website. Creating or starting one is separate from routing the website's requests to it.

Before you start

You need write permission for the intended website, its application files and a start command suited to the managed runtime. Preserve existing routing and application state before changing them.

What to do

  1. Open the intended website's Node.js apps tab. Check the domain, environment and any existing apps before using Add app.
  2. Enter the app name, start command and working directory relative to the website's /site mount. Review memory, CPU and environment settings. The app should read its assigned listening port from process.env.PORT.
  3. Save the app and inspect its saved configuration. A new app starts stopped; use Start when you intend to run it, then inspect its state and Logs.
  4. Test the running application before using Connect website. Review the confirmation: website requests will be sent to this app, so this changes the website's routing.
  5. Use Edit, Restart or Stop for the intended process. Use Disconnect website when you intend to restore the previous web-server routing, and verify the public website afterwards.
  6. Remove deletes the managed process configuration while retaining application files. Review its confirmation and inspect the resulting app list rather than assuming that files or unrelated services were removed.

What happens next

The selected app has an accepted process configuration and observable running state. The website uses that app only after the separate routing connection is accepted.

If something goes wrong

Check the relative directory, uploaded files, start command, runtime, assigned port, limits and logs if the app does not start or serve requests. Refresh the actual process and routing state before repeating an uncertain action. Keep environment secrets out of screenshots, commands shared with others and support messages.