你可以运行类似npm start 8080的代码,并且不需要去修改script.js或者配置文件:

例如,在你的"scripts"JSON值,包括--

"start": "node ./script.js server $PORT"

然后从命令行添加以下代码:

$ PORT=8080 npm start

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2021-06-28
  • 2021-11-05
  • 2022-12-23
猜你喜欢
  • 2021-12-30
  • 2022-12-23
  • 2021-07-12
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案