2 2 Node Chap 5 Starting Node Chap
- Slides: 32
2 2. Node 시작하기 Chap 5. Starting Node Chap 6. Starting a Node Server Chap 7. Routing Node Applications
Node로 웹서버 만들어보기 14 (1) Node 만으로 웹서버 만들기 (express 사용 안함) (2) Express를 이용하여 웹서버 쉽게 만들기 http-server 프로젝트 폴더를 만들고 package. json과 index. html 파일을 만들자. Package. json: { } "name": "http-server", "version": "1. 0. 0", "description": "", "main": "server. js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "author": "", "license": "ISC" Index. html: <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title> First date</title> </head> <body> <h 1> Hello Universe! </h 1> </body> </html>
(2) Express를 이용하여 웹서버 쉽게 만들기 19 Express API document 참조 https: //expressjs. com/en/4 x/api. html
라우팅 23 현재의 홈페이지에 다음 기능들을 추가해보자. • • Basic Routes (We’ve already created the homepage) Site Section Routes (Admin section with sub routes) Route Middleware to log requests to the console Route with Parameters (http: //localhost: 1337/users/holly) Route Middleware for Parameters to validate specific parameters Login routes doing a GET and POST on /login Validate a parameter passed to a certain route • • 기본 루트 admin 섹션 라우팅 /admin route 미들웨어를 이용하여 서버의 콘솔에 request 로그 남기기 파라메터를 이용하는 라우팅 (http: //localhost: 1337/users/holly) route 미들웨어를 이용하여 파라메터의 유효성 검사 로그인 루트 제공 /login 루트에서 GET, POST 기능 어떤 루트에 전달된 파라메터의 유효성 검증
라우팅 기능 요약 32 Express의 router는 여러 가지 유연한 방식으로 라우트 를 정의할 수 있음 � � � Use express. Router() multiple times to define groups of routes Apply the express. Router() to a section of our site using app. use() Use route middleware to process requests Use route middleware to validate parameters using. param() Use app. route() as a shortcut to the Router to define multiple requests on a route
- Chap chap slide
- Struct node int data struct node* next
- Interference and standing waves
- Typedef struct node
- Reference node and non reference node
- Parallel spin
- Reference node and non reference node
- Tree switch
- Close family chapter 3
- The origin of species scan 22
- A thousand splendid suns summary chapter 1
- Breath at the same air bl
- Chap 22
- Chap. 1
- Fitness - chapter 1
- Elements of physical fitness
- đường bao của mặt cắt chập được vẽ bằng
- The origin of species ch. 18
- Rivalry 1 chapter 6
- C chap
- Building responsible relationships
- Assumptions of clrm gujarati
- Payback chap 9
- Weather station model examples
- What is migration
- I was in that state when a chap easily turns nasty analysis
- Chap counter
- The origin of species manga cap 24
- Mad dog symbol
- To not die chap 18
- Chapter 1 clothing
- Chap lipman
- Youjip