# 4회차

## Node.js 설치

## Node.js 콘솔사용

예제 : <https://nodejs.junyoung.me/http-create/>)

## express.io

* Node.js에서는 MVC( Model- View- Model) 패턴의 적용을 쉽게 해주는 여러 서드파티 모듈이 있다.

  그중에 가장 대중들이 널리 쓰는 모듈이 Express.js 이다.

Express.js는 싱글페이지 , 멀티페이지 그리고 하이브리드 웹 어플리케이션을 작성하기 위한 강력한 기능들을 제공함으로써, 간편한 코드로 휼륭한 웹 어플리케이션을 만들 수 있게 해 주며, 특히 강하고 유연한 라우터 기능을 제공한다.

1. HTTP 요청 바디 파싱
2. 쿠키 파싱
3. 세션 관리
4. URL 경로와 HTTP요청 메소드를 기반으로 한 복잡한 if조건문을 이요한 라우트 구성
5. 데이터 타입을 기반으로 적절한 응답 헤더 결정

## npm

* Node Package Modules
* package.json을 활용해 의존성 관리
* npm uninstall
* npm list
* nodemon
* rest API


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://incheol-jung.gitbook.io/docs/study/nodejs/2018-01-16-nodejs-4st.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
