์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- slice
- Reduce
- react
- Nextjs
- error
- Programmers
- ์๋ฐ์คํฌ๋ฆฝํธ
- Javascript
- ์ฝ๋ฉํ ์คํธ์ฐ์ต
- ๋ ธ๋js
- indexOf
- CLI
- TypeScript
- node
- npm
- ์ต๊ทค๋ฌ
- ๋ง์์ปค๋ฅ์
- Method
- ๋ ธ๋
- ๋ ธ๋์ ์ด์์ค
- codingtest
- angular
- ์ฝ๋ฉํ ์คํธ
- nodejs
- ํ์ ์คํฌ๋ฆฝํธ
- Array
- ๋ฐฑ์๋
- ๊ฐ๋ฐ
- ํ๋ก๊ทธ๋๋จธ์ค
- ์๋ฌ
- Today
- Total
๋ชฉ๋ก๋ฐฑ์๋ (3)
Suzie's Blog
Express server ๊ตฌ์ถํ๋ ๋ฐฉ๋ฒ 1. ๋๋ ํ ๋ฆฌ๋ฅผ ์์ฑํ๋ค mkdir directoryName 2. index.js ํ์ผ์ ๋ง๋ ๋ค 3. npm init ์ ์คํํ๋ค (-y : yes for every single questions) npm init -y 4. Express ํจํค์ง๋ฅผ ์ค์นํ๋ค npm i Express 5. Server Application์ index.js์ ์์ฑํด์ค๋ค import express from "express"; const app = express(); const port = 1000; app.listen(port, () => { console.log(`Server running on port ${port}.`); }); 6. ์๋ฒ๋ฅผ ์ผ์ค๋ค node index.js ์๋ฒ๊ฐ..

์ค๋งํธํฐ์ผ๋ก QR์ ์ฐ์ด ๋ด๊ฐ ์ํ๋ ์น์ฌ์ดํธ๋ก ๋ฐ๋ก ๊ฐ ์ ์๊ฒ QR์ฝ๋๋ฅผ ๋ง๋๋ ๋ฐฉ๋ฒ์ ์ฝ๊ฒ ์๊ฐํ๊ฒ ๋ค. ์ด 2๊ฐ์ง npm package๋ฅผ ์ค์น ํ ๋ฐ๋ผ์ค๋ฉด ๋๋ค. 1. inquirer npm package ์ค์น : ์ํ๋ ์น์ฌ์ดํธ ์ฃผ์๋ฅผ ์ ๋ ฅํ๊ธฐ ์ํ ์์ ์ ์ํ ํจํค์ง https://www.npmjs.com/package/inquirer inquirer A collection of common interactive command line user interfaces.. Latest version: 9.2.10, last published: a month ago. Start using inquirer in your project by running `npm i inquirer`. There are ..

node .\index.js\ NodeJS Docs ์น์ฌ์ดํธ์ ์ ์ํ๋ฉด ๊ฐ ๋ฒ์ ๋ณ๋ก API๋ฅผ ์ฌ์ ์ฒ๋ผ ์ฐพ์ ๋ณผ ์ ์๋ค. https://nodejs.org/en/docs Documentation | Node.js Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. nodejs.org ์ค๋์ ๊ฐ๋จํ๊ฒ ์์ documentation์ ์ฐธ๊ณ ํด์ File system API๋ฅผ ํ์ฉํ์ฌ node๋ฅผ ๋์์์ผ๋ณด๋ ค๊ณ ํ๋ค. ์ค๋์ ๋ชฉํ๋ txtํ์ผ์ ๋ง๋ค๊ณ ๊ทธ ํ์ผ์ ์ฝ๋ ๋ก์ง์ ์คํ์ํค๋ ๊ฒ์ด๋ค. ์ผ๋จ ์๋์ ๊ฐ์ด ์ฝ๋๋ฅผ ์ ๋ ฅํด์ File System API๋ฅผ ๋ถ๋ฌ์จ๋ค. const fs = require("fs"); 1. txtํ์ผ ์์ฑํ..