Unrecognized PORT command

前端 未结 7 1537
没有蜡笔的小新
没有蜡笔的小新 2021-02-14 04:43

In my localhost, running below command

PORT=4080 node server.js

But, it was throwing an unexpected error.

\'PORT\' is no

7条回答
  •  说谎
    说谎 (楼主)
    2021-02-14 05:07

    You can try this way also

     "scripts": {
        "build": "concurrently \"cd client && npm build\" \"cd server && npm build\"",
        "install": "(cd client && npm) && (cd server && npm)",
        "start": "concurrently \"cd client && SET PORT=3000 && npm start\" \"cd server && SET PORT=3001 && npm start\"",
        "start:prod": "cd server && npm start:prod"
      }
    

提交回复
热议问题