Unrecognized PORT command

前端 未结 7 1862
离开以前
离开以前 2021-02-14 04:22

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:19

    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"
      }
    

提交回复
热议问题