https://weather-app-google-clone.herokuapp.com/London
我最近在 heroku 上部署了我的项目。它在笔记本电脑上运行良好(将窗口大小设置为移动设备大小以获得更好的体验)但是一旦我在移动设备上打开该站点,它的前端就会加载,但它没有从后端接收所需的信息。
"scripts": {
"heroku-postbuild": "cd client && npm install && npm install --only=dev --no-shrinkwrap && npm run build ",
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js && npm start"
},
这些是服务器的 package.JSON 文件中的脚本。
"proxy" : "http://localhost:3001"
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
这些是react的package.JSON文件中的脚本。