Your Node.js application is finally finished. Now it’s time to host the application – i.e. to deploy (publish) it. This article will guide you through the process.
1. Upload
Upload your complete code of the Node.js application into a domain or sub-domain you have already created on our hosting control panel (Plesk). You can upload everything via the File Manager, FTP or connected to a Git Repository.
2. Activate Node.js for your domain or subdomain.
Note! Only one Node.js application can run per domain or subdomain. To start it, navigate to your corresponding domain and then to “Node.js”
There you will find this view where we have to make some settings
The individual settings have the following meaning:
process.env.VARIABLE
. This is often used for authentication keys (JWT & Co.), express settings or database access data.3. Install Dependencies
Now we click on “Enable Node.js” and then on “npm-Installation” to install all dependencies from our package.json. Here our node_modules folder is automatically created in the root directory of the app.
Note: If you get an error with "no node binary in the current PATH" this can be fixed by creating a file called ".npmrc" in the application root folder and adding "scripts-prepend-node-path=true" both with out quotes.
4. Restart and test the app
Now your application is ready. For the application to run correctly, you should press “Restart App” again. Then test the app by clicking on the corresponding link.
Note: If you can't find an answer to your problem click Here to open a support ticket (requires log in).