[TIL] NodeJS

Dev_minยท2019๋…„ 10์›” 8์ผ
0

TIL

๋ชฉ๋ก ๋ณด๊ธฐ
13/61

๐Ÿ‘‰ NodeJS : Javascript๋ฅผ ๊ธฐ๊ณ„์–ด๋กœ ์ปดํŒŒ์ผ ํ•ด์ฃผ๊ณ , NonBlocking์œผ๋กœ ์†๋„๊ฐ€ ๋น ๋ฅด๋‹ค

  1. Non-Blocking
    : Input/Output ์ž‘์—…์ด ์ง„ํ–‰๋˜๋Š” ๋™์•ˆ ์œ ์ € ํ”„๋กœ์„ธ์Šค์˜ ์ž‘์—…์„ ์ค‘๋‹จ์‹œํ‚ค์ง€ ์•Š๋Š” ๋ฐฉ์‹

  2. Node core modules
    : ๋”ฐ๋กœ ์„ค์น˜ํ•˜์ง€ ์•Š์•„๋„ node ๋‚ด์— ์กด์žฌํ•˜๋Š”, ๋ฒˆ๋“ค๋ง๋˜์–ด ์žˆ๋Š” ๋ชจ๋“ˆ
    fs / http / url / path ๋“ฑ

  3. NPM - Node Package Manager
    : package.json์— ๊ทธ ์ •๋ณด๋“ค์ด ๋‹ด๊ฒจ์ ธ ์žˆ๋‹ค.

๐Ÿ‘‰ RESTful API & CommonJS & Make Express Hiddleware

๐Ÿ‘‰ event loop : stack์ด ๋น„์›Œ์ง€๋ฉด task queue์— ๋‚จ์€ data๋ฅผ stack์— ๋‹ค์‹œ ๋„ฃ์–ด ์‹คํ–‰์‹œํ‚ค๋Š” ๊ฒƒ (setTimeout์ด 0์ดˆ์—ฌ๋„ ๋ฐ”๋กœ ์‹คํ–‰๋˜์ง€ ์•Š๋Š”๋‹ค)

๐Ÿ‘‰ Resource : REST์—์„œ ์ •๋ณด์˜ ๊ฐ€์žฅ ํ•ต์‹ฌ์ ์ธ ์ถ”์ƒํ™”๋Š” ๋ฆฌ์†Œ์Šค(์ด๋ฆ„์„ ๋ถ™์ผ ์ˆ˜ ์žˆ๋Š” ์ •๋ณด๋ฉด ์–ด๋–ค ๊ฒƒ์ด๋“  ๋ฆฌ์†Œ์Šค๊ฐ€ ๋  ์ˆ˜ ์žˆ๋‹ค)

  • ๋ฆฌ์†Œ์Šค๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š”๋ฐ ๋ช…์‚ฌ ์‚ฌ์šฉ / ์ผ๊ด€์„ฑ / CRUD (create/read/update/delete) ๊ธฐ๋Šฅ ์ด๋ฆ„์€ URI์— ์‚ฌ์šฉ๊ธˆ์ง€ / filter๊ฐ€ ํ•„์š”ํ•˜๋ฉด query component ์‚ฌ์šฉ
profile
TIL record

0๊ฐœ์˜ ๋Œ“๊ธ€