//미리보기 ⬆️
//리액트 프로젝트 'BE 세팅하기(2) axios/proxy'에서 이어집니다.
npm i nodemon --save-dev
nodemon은 디렉토리의 파일 변경이 감지되면 노드 애플리케이션을 자동으로 다시 시작하여 node.js 기반 애플리케이션을 개발하는 데 도움이되는 도구입니다.
npm i concurrently --save
동시에 여러 명령을 실행합니다. (서버와 클라이언트 동시 실행)
...
"scripts": {
"backend": "nodemon server/index.js",
"start": "concurrently \"npm run backend\" \"npm run start --prefix client\"",
"test": "echo \"Error: no test specified\" && exit 1"
},
...
몽고디비 켜놓기
npm run start