我正在使用 MongoDB、ExpressJS、ReactJS(create-react-app) 和 NodeJS 构建一个 Web 应用程序。我已经完成了开发部分,现在我想将此 Web 应用程序部署到 Ubuntu 服务器。
我的文件结构如下点击查看图片
package.json (服务器)
{
"name": "pair-programming",
"version": "1.0.0",
"description": "pair-programming web app for codechef's hackathon",
"main": "server.js",
"scripts": {
"client-install": "npm install --prefix client",
"start": "node server.js",
"server": "nodemon server.js",
"client": "npm start --prefix client",
"dev": "concurrently \"npm run server\" \"npm run client\"",
"serve-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"
},
"author": "Parmeet Singh",
"license": "ISC",
"dependencies": {
"bcryptjs": "^2.4.3",
"body-parser": "^1.18.3",
"concurrently": "^4.0.1",
"express": "^4.16.3",
"jsonwebtoken": "^8.3.0",
"mongodb": "^3.1.6",
"mongoose": "^5.2.13",
"node-uuid": "^1.4.8",
"nodemailer": "^4.6.8",
"passport": "^0.4.0",
"passport-jwt": "^4.0.0",
"request": "^2.88.0",
"sprintf-js": "^1.1.1",
"validator": "^10.7.1"
},
"devDependencies": {
"nodemon": "^1.18.4"
}
}
package.json(反应)
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.18.0",
"classnames": "^2.2.6",
"jwt-decode": "^2.2.0",
"react": "^16.5.1",
"react-dom": "^16.5.1",
"react-redux": "^5.0.7",
"react-router-dom": "^4.3.1",
"react-scripts": "1.1.5",
"redux": "^4.0.0",
"redux-thunk": "^2.3.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"proxy": "http://0.0.0.0:5000"
}
因此,如果可能的话,请帮助我将此 Web 应用程序部署到 ubuntu 服务器。我之前没有在ubuntu上部署过。