Unrecognized PORT command

前端 未结 7 1554
没有蜡笔的小新
没有蜡笔的小新 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:26

    In Windows you can set scripts in package.json:

    "start": " set PORT=portnumber && react-app-rewired start"
    

    or

    "start": " set PORT=3001 && react-script start".
    

    It worked for me:

    in package.json file

    0 讨论(0)
提交回复
热议问题