๊ด€๋ฆฌ ๋ฉ”๋‰ด

๋ชฉ๋กnodemon (1)

JUINTINATION

Express.js์™€ nodemon

nodemon์ด๋ž€?nodemon์€ ๋””๋ ‰ํ† ๋ฆฌ์˜ ํŒŒ์ผ ๋ณ€๊ฒฝ์ด ์ด๋ฃจ์–ด์กŒ์„ ๋•Œ ๋…ธ๋“œ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์ž๋™์œผ๋กœ ์žฌ์‹œ์ž‘ํ•ด์ฃผ๋Š” ๋ชจ๋“ˆ๋กœ ์‰ฝ๊ฒŒ ๋งํ•˜๋ฉด ๊ฐœ๋ฐœ ์‹œ ์†Œ์Šค ์ฝ”๋“œ ๋‚ด์šฉ ๋ณ€๊ฒฝ์œผ๋กœ ์ธํ•ด ์„œ๋ฒ„๋ฅผ ์ข…๋ฃŒํ•˜์˜€๋‹ค๊ฐ€ ์žฌ์‹œ์ž‘ํ•˜๋Š” ๋ฒˆ๊ฑฐ๋กœ์šด ์ž‘์—… ์—†์ด ์ž๋™์œผ๋กœ ๋ณ€๊ฒฝ๋œ ์†Œ์Šค ํŒŒ์ผ๋กœ ์ ์šฉ๋˜๊ฒŒ ํ•ด์ค€๋‹ค.์ผ๋‹จ ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•œ ๋’ค์— $ npm install nodemon ์ปค๋งจ๋“œ๋ฅผ ์‹คํ–‰ํ•˜์—ฌ nodemon ๋ชจ๋“ˆ์„ ์„ค์น˜ํ•œ๋‹ค.์ด ๋ชจ๋“ˆ์€ ํ”„๋กœ์ ํŠธ์—์„œ ๋”ฐ๋กœ requireํ•  ํ•„์š”์—†์ด package.json ์˜ "scripts"์— ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ๋œ๋‹ค. ์˜ˆ์‹œ๋กœ ์ž‘์„ฑํ•œ ์ฝ”๋“œ๋ฅผ ์ฝ์–ด๋ณด์ž.app.jsconst express = require('express');const http = require('http');const path = require('path');co..

StudyNote 2024. 1. 23. 22:53