Posted windows server node project (express + mysql) in Tencent cloud

After buying the first server and the domain name (you can follow the steps to), we came to the console. (System recommended by the 2012, 2016 too card, you can reinstall the system)

Press win + R on the notebook enter cmd command line, type mstsc, enter the public ip, user name, password (here to re-set their own Tencent cloud console). Link, the link may be detailed settings notebook disk local resources, which can be found inside a laptop disk in the server to achieve the transfer of the project.
Here Insert Picture Description
After the link server interface, and then configure the node before installing the environment in a notebook, mysql, express the same operation, not go into here.

After express project to migrate to the server, some module can not see, do not know why, it is proposed to re-generate an express project, and then put their items in addition to covering part of the module just fine. This time to run the project, only local access, use the ip access can not.

That is because there is no security group set up an open port, to set up a security group, as follows, set up. The examples (ie, server) add to the mix.
Here Insert Picture Description
What are the command line to enter the project folder input node + app.js (your main file name) to run the project, you can access the (if not enough, then I do not know, the original is not enough, then loaded the pagoda, iis of)

note! ! !

app.js in the listen () This port must be written listen (80), if an error occurs, say node does not have permission listen80, solution:

https://www.cnblogs.com/liuzhibin/p/5653356.html// I just bought a server, so there is no problem loopback address, port 80 is because their system is occupied

https://blog.csdn.net/limfungsuen/article/details/78112188// loopback address the problem, this blog command line input format seems to be wrong, you can own Baidu.

Seemingly simple, but tangled several days to do a good job, mainly people node system with windows too little, but for me this adorable new Linux too unfriendly, and post-maintenance is also troublesome, although it has also to learn, hhh.

The first site is still quite happy to do, a lot of problems to solve, what questions please give me a shout. I will actively answer.

Reference article: https: //blog.csdn.net/leezsj/article/details/79576073

Released three original articles · won praise 0 · Views 89

Guess you like

Origin blog.csdn.net/qq_41003479/article/details/104056725