0

我想同时运行一个并发命令。我不知道解释它的最佳方法,但这是我的解释,我想npm run dev从服务器端运行,但它不起作用,npm run electron-client是客户端的并发脚本。我怎么做?

// Client Side
"scripts": {
    "start": "PORT=8000 react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "electron": "concurrently \"BROWSER=none npm start\" \"wait-on http://localhost:8000 && electron .\""
  },

// Server Side
"scripts": {
    "server": "nodemon index.js",
    "client": "npm start --prefix client",
    "electron-client": "npm electron --prefix client",
    "dev": "concurrently \"npm run server\" \" npm run electron-client\""
  },
4

0 回答 0