์ธํŒŒ

You Can Become A

๋Šฆ๊ฒŒ ์‹œ์ž‘ํ•ด๋„ ๋ˆ„๊ตฌ๋“ ์ง€ ๋…ธ๋ ฅํ•˜๋ฉด ๊ฐœ๋ฐœ์ž๊ฐ€ ๋ ์ˆ˜ ์žˆ์–ด์š” !

๋™์  ํ™˜๊ฒฝ๋ณ€์ˆ˜

๊ณต๋ถ€ํ•œ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•ฉ๋‹ˆ๋‹ค
Node Package

[NODE] ๐Ÿ“š cross-env ๋ชจ๋“ˆ ์‚ฌ์šฉ๋ฒ•

๋…ธ๋“œ env ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ • ๋ณดํ†ต ๋…ธ๋“œ ์„œ๋น„์Šค๋ฅผ ๊ฐœ๋ฐœ(development)ํ•˜๊ณ  ๋ฐฐํฌ(production)ํ•  ๋•Œ env ๊ฐ’์„ ์ด์šฉํ•ด์„œ ๊ตฌ์„ฑํ•œ๋‹ค. ์˜ˆ๋ฅผ๋“ค์–ด ๋ฐฐํฌ ๋ชจ๋“œ ์ผ ๋•Œ์—๋Š” ํŒŒ์ผ ์บ์‹ฑ, ์—๋Ÿฌ ๋ฉ”์„ธ์ง€ ๊ฐ์ถ”๊ธฐ ๋“ฑ ๋ฐฐํฌ์— ์ ํ•ฉํ•œ ํ™˜๊ฒฝ ์„ค์ •์„ ํ•˜๊ณ , ๊ฐœ๋ฐœ ๋ชจ๋“œ ์ผ ๋•Œ์—๋Š” ํŒŒ์ผ ์บ์‹ฑ ๋ฐฉ์ง€, ๋””๋ฒ„๊ทธ๋ฅผ ์œ„ํ•œ ์ƒ์„ธํ•œ ์—๋Ÿฌ ๋ฉ”์„ธ์ง€ ๋ณด์ด๊ธฐ ๋“ฑ ๊ฐœ๋ฐœ์— ํ•„์š”ํ•œ ํ™˜๊ฒฝ ์„ค์ •์„ ํ•œ๋‹ค. ์‹ค๋ฌด ์ฝ”๋“œ๋ฅผ ๋“ค์ž๋ฉด ๋Œ€ํ‘œ์ ์œผ๋กœ ๋…ธ๋“œ ์„œ๋ฒ„์˜ ๋กœ๊ทธ๋ฅผ ์ฐ์–ด์ฃผ๋Š” morgan ๋ฏธ๋“ค์›จ์–ด์ผ ๊ฒฝ์šฐ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋กœ๊ทธ ๋ ˆ๋ฒจ์„ ๊ฐœ๋ฐœ์ผ๋–„๋Š” 'dev', ๋ฐฐํฌ์ผ๋–„๋Š” 'combined' ๋กœ ์„ค์ •ํ•˜์—ฌ ์ ์šฉ์‹œํ‚จ๋‹ค. // ๋…ธ๋“œ ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ •์— ๋”ฐ๋ผ morgan ์„ค์ •์„ ๋‹ฌ๋ฆฌํ•จ if (process.env.NODE_ENV === 'production') { app.use(mo..

category_image
์ธํŒŒ_
2022.06.08
5