frbet - concurrently

Jaymee·2021년 9월 14일
0

노드 서버와 리액트 서버를 동시에 돌려주는 패키지.
$ npm install --save-dev concurrently

"scripts": {
    "client" : "cd ../client && npm start",
    "start": "tsc-watch --onSuccess \"ts-node dist/app.js\"",
    "test": "echo \"Error: no test specified\" && exit 1",
    "dev": "concurrently tsc-watch --onSuccess \"npm run client\" \"ts-node dist/app.js\"",
    "dev-con" : "concurrently --kill-others-in-fail \"npm start\" \"npm run client\""
  },

여기서 중요한 점은 노드서버를 먼저 돌리고 나서 리액트 서버를 돌려야 한다.
npm start -> npm run client

profile
backend developer

0개의 댓글

관련 채용 정보