Node.js์ ์ญ์ฌ
html์ ์ฝ๋ฉํด์ ์นํ์ด์ง๋ฅผ ์ง์ ๊ฐ๋ฐํ๋ ๊ฒ์ ๋ํ ๋ถ๋ง, html ์ฝ๋๋ฅผ ์์ ํ๋ ค๋ฉด ์ ์ฒด๋ฅผ ์์ ํด์ผํ๋ฏ๋ก ์ ์ง๋ณด์ํ๊ธฐ ์ด๋ ค์
์น์ฌ์ดํธ์ ์์ ์๋ง์ด ์ปจํ ์ธ ๋ฅผ ์ถ๊ฐํ ์ ์์ผ๋ฏ๋ก, ์นํ์ด์ง ์ฑ์ฅ์ด ๋๋๊ฒ ๋จ
์ด๋ฅผ ํด๊ฒฐํ๊ณ ์, ์ด๋ฏธ ์๋ฐ์คํฌ๋ฆฝํธ์ ์ต์ํ ์น ๊ฐ๋ฐ์๋ค์ด ์๋ก์ด ์ปดํจํฐ์ธ์ด๋ฅผ ๋ฐฐ์ฐ์ง ์๊ณ ๋ ์น ํ์ด์ง๋ฅด๋ฅด ์๋์ผ๋ก ์์ฑํ๋ ์๋ฒ์ชฝ ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ง๋ค ์ ์๊ฒ ํ๊ณ ์ถ์ด์ ํ์ํ Node.js
2008, ๊ตฌ๊ธ์ด ํฌ๋กฌ ์น๋ธ๋ผ์ฐ์ ์์ ๋์ํ๋ ์๋ฐ์คํฌ๋ฆฝํธ์ ์ฑ๋ฅ์ ๊ฐ์ ํ๊ธฐ ์ํด์ V8์์ง์ ๊ฐ๋ฐํจ
์๋ฐ์คํฌ๋ฆฝํธ๊ฐ ์น๋ธ๋ผ์ฐ์ ๋ฅผ ์ ์ดํ๋ ๊ฒ์ด์๋ค๋ฉด, Node.js๋ ์๋ฐ์คํฌ๋ฆฝํธ๋ฅผ ์ด์ฉํด์ ์น๋ธ๋ผ์ฐ์ ๊ฐ ์๋ ์ปดํจํฐ ์์ฒด๋ฅผ ์ ์ด
Node.js๊ฐ ์๋ค๋ฉด,
์์ฒ๊ฐ์ <ul></ul>ํ๊ทธ๋ฅผ ๋ค๋ฅธ ํ๊ทธ๋ก ๋ฐ๊พผ๋ค๊ณ ํ ๋, ํ๋ํ๋ ์ง์ ๋ฐ๊พธ์ด์ฃผ์ด์ผํ๋ค!
์ฌ์ฉ์์ ์ฐธ์ฌ๊ฐ ์ ํ๋จ ( ๋ธ๋ก๊ทธ ๊ธ์ ์์ฑํ๊ณ , ๋ธ๋ก๊ทธ ๋ชฉ๋ก์ ๋์ฐ๋ ๊ฒ๋ ์ง์ html๋ก ํ๋ํ๋ ์์ฑํด์ฃผ์์ด์ผํ์)
์ง์ ์ฌ์ฉ์์ ์ฐธ์ฌ๋ฅผ ๋ฐ์ ์ ์์. ( CRUD ๋ฅผ ์น์ ํตํด์ ํ ์ ์๋๋ก ์ ๊ณต )
์ง์ ๊ธ์ ์์ฑํ๊ณ , ๋ชฉ๋ก์ update๊ฐ ๋๋๋ก
์ธ์ ?
API with database behind it ( preferably NoSQL)
Data Streaming ( ex . Youtube)
Real-time chat application
Server-side web application
Node.JS์ ์ฅ์
Single- threaded, based on event driven, non-blocking I/O model
Perfect for building fast and scalable data-intensive apps
JavaScript across the entire stack : faster and more efficient development
NPM : huge library of open-source packages available for everyone for free
Very active developer community
Node.JS ๋จ์ , ์ฌ์ฉ ๋ชปํ๋ ํ๊ฒฝ
Applications with heavy server-side processing (CPU - intensive)
command + K : terminal clear
node : node ์ฝ๋ ์์
.exit , command + D : node ์คํ ์ค์ง
tab : global variables ์ ๋ณผ ์ ์์ , ๋ ธ๋ ๋ชจ๋๋ค์ ๋ณผ ์ ์์
String. + tab : String์ property๋ฅผ ๋ณผ ์ ์์
3 + 8
_ + 6 : _ underscore : ๊ทธ ์ ์ ๊ฒฐ๊ณผ๋ฅผ ๊ฐ์ ธ์ด
'Server๐งค > Node.JS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Node.js] ์ด๋ฒคํธ๊ธฐ๋ฐ (1) | 2022.10.03 |
---|---|
ํธ์ด์คํ ์ด๋? / var๋ฅผ ์ง์ํ๊ณ const, let ์ฌ์ฉํ๋ผ๋ ์ด์ (0) | 2022.10.03 |
[Node.js] NPM ๋ผ์ด๋ธ๋ฌ๋ฆฌ (0) | 2022.06.21 |
[Node.js] NPM ๋ชจ๋ (0) | 2022.06.12 |
[Node.JS] ํ์ผ ์ฝ๊ธฐ & ์ฐ๊ธฐ (0) | 2022.06.08 |