I want to set up a second node.js server to run an express.js application which is an exact and independent copy of my current html (client-side) and js (server-side) files.
The reason is that I want to deploy my current code in a production environment that can be used by the team that will not be shut down, while I work on my current code in a development environment.
My worry is that I have added my current node.js server to my path and I am not sure if upon installation of the second node.js server my command to start the second server will interfere with the node.js server I have saved in my path variable.
Here are a couple of things to know before I ask my questions:
I am using the instructions to install another instance of node.js and express.js at:
www.vultr.com/docs/installing-node-js-and-express
My questions are as follows:
Thank you for your guidance.
Developing and serving from the same PC is not preferable, however, if you must, this is what you can do.
First, there is no need to install a second copy of node on to your machine - you can run multiple processes of node on the same machine without any problem. What I suggest you do is this:
config
package: https://www.npmjs.com/package/config Regarding the port numbers, you can use anything that is above 1024 and below 65535
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.