Modify the port of express, specify the port number

We create the express project, and the default port is 3000 after startup. At this time, we can customize the port like this

Open app.js

Insert picture description here
Add code

	process.env.PORT = 2000;

Guess you like

Origin blog.csdn.net/qq_44977477/article/details/106781319