Skip to content
New issue

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

生产环境中,服务端如何打包部署呢 #5

Closed
toadprince opened this issue Apr 12, 2018 · 1 comment
Closed

生产环境中,服务端如何打包部署呢 #5

toadprince opened this issue Apr 12, 2018 · 1 comment

Comments

@toadprince
Copy link

您好,服务端文件夹server会被打包吗?部署到生产环境是要把server源码拷贝过去用npm run server命令来实现启动服务端吗?

@scscms
Copy link
Owner

scscms commented Apr 12, 2018

服务端执行的文件不会打包的。npm run build只打包前端代码。如果你在服务器里要同时运行前后端就全部代码拷贝过去。如果只想运行后端以下文件是必须的:

package.json
app.js
server-entry.js
node_modules/
config/
server/

@scscms scscms closed this as completed Oct 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants