We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
您好,我已经看过您的文章,但是我疑惑的是server代码是不是要放在服务器里,然后是怎么启动的,每次都要手动的node server_entry.js吗,盼回复,感谢您!
The text was updated successfully, but these errors were encountered:
生产环境下应该要先build,然后再用pm2启动。命令是npm run start:pm2,代码如下: https://github.com/Molunerfinn/vue-koa-demo/blob/master/package.json#L15
npm run start:pm2
nginx方面的配置大概是这样(只给关键部分):
http { upstream nodeServer { server 127.0.0.1:8888; } server { listen: 80; server_name: nodeServer; location / { proxy_pass http://nodeServer; proxy_redirect off; } } }
你可以选择在服务端构建也可以选择在本地构建完把dist目录上传。
代码的话,如果是生产环境,主要就是这几个文件/目录:
当然不推荐单独把关键文件目录拿出来。推荐是可以把代码放服务端然后在服务端构建。
Sorry, something went wrong.
No branches or pull requests
您好,我已经看过您的文章,但是我疑惑的是server代码是不是要放在服务器里,然后是怎么启动的,每次都要手动的node server_entry.js吗,盼回复,感谢您!
The text was updated successfully, but these errors were encountered: