【发布时间】:2019-10-16 03:00:29
【问题描述】:
我将使用 WebStorm IDE 进行全栈实现。我为此使用 react.js 和 node-express。我可以在单独的项目中做到这一点。但是我想知道如何在配置端口的同时在WebStorm项目中实现后端和前端。
在启动前端时,我们可以在"start": "parcel index.html" 下的 package.json 文件中提供启动 html 文件。启动后端时我们可以给"node app.js" 但是当我们在两个不同的项目中进行实现时可以这样做。
但是,如果我们同时做前端和后端,我该如何在两个不同的端口上启动 react 部分和 node-express 部分?例如:
- 反应应用 > localhost:1234
- node-express > localhost:3000
"start": "parcel index.html"
"start": "node app.js"
//在package.json中我们只能设置一个start
【问题讨论】:
标签: node.js reactjs webstorm react-fullstack