๋ฐ˜์‘ํ˜•
๐Ÿค” ๋งŒ์•ฝ node ./backend/src/server.js ์™€ cd ./frontend -> npm run start ๋ฅผ ์ด์šฉํ•ด์„œ ์„œ๋ฒ„์™€ ํ”„๋ก ํŠธ์•ค๋“œ๋ฅผ ๋™์‹œ์— ์‹คํ–‰ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผํ• ๊นŒ?
 

concurrently

๋‘ ๋ช…๋ น์–ด๋ฅผ ํ•ฉ์ณ์„œ ์‹คํ–‰ํ•˜๋ ค๋ฉด "concurrently" ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.
์ด ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” ์—ฌ๋Ÿฌ ๋ช…๋ น์–ด๋ฅผ ๋™์‹œ์— ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ค€๋‹ค.
 

๋จผ์ €, "concurrently" ์„ค์น˜๋ฅผ ํ„ฐ๋ฏธ๋„์—์„œ ์ง„ํ–‰

npm install -g concurrently

 

๊ทธ๋Ÿฐ ๋‹ค์Œ, ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ช…๋ น์–ด๋ฅผ ํ•ฉ์ณ์„œ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค.

concurrently "node ./backend/src/server.js" "cd ./frontend && npm run start"

์œ„ ๋ช…๋ น์–ด๋Š”

๋ฐฑ์—”๋“œ ์„œ๋ฒ„๋ฅผ ์‹œ์ž‘ํ•˜๋Š” "node ./backend/src/server.js"์™€

ํ”„๋ก ํŠธ์—”๋“œ ์„œ๋ฒ„๋ฅผ ์‹œ์ž‘ํ•˜๋Š” "cd ./frontend && npm run start" ๋ช…๋ น์–ด๋ฅผ ๋™์‹œ์— ์‹คํ–‰ํ•œ๋‹ค.

 

์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ๋‘ ์„œ๋ฒ„๋ฅผ ๊ฐ„๋‹จํ•˜๊ฒŒ ํ•œ ๋ฒˆ์— ์‹œ์ž‘ํ•  ์ˆ˜ ์žˆ๋‹ค.

๋ฐ˜์‘ํ˜•