Express
Node.js FrameWork
키워드
- Express 란
- URL 구조
- REST API
- HTTP Method(CRUD)프론트엔드 개발자이지만 백엔드 영역을 건들일이 많다.
mkdir express-demo-app
cd mkdir express-demo-app
# .gitIgnore
touch .gitignore
echo "/node_modules/" > .gitignore
# Package Init
npm init -y
# TypeScript Inttall
npm i -D typescript
npx tsc --init
# ESLint Install
npm i -D eslint
npx eslint --init
#------------------------------#
how would you lie to use Eslint?
> To Check syntax, find problems, and enforce code style
What type of moduls your project use?
> JavaScript modules (import/export)
Which framework does your project use?
> None of these
Does your project use TypeScript?
> Yes
Where does your code run?
> Node
Which style guid do you want to follow?
> XO: https://github.com/xoojs/eslint-config-xo-typescript
What format do you want your config file to be in?
> JavaScript
Would you like to install them now?
> Yes
Which package manager do you want to use?
> npm
#------------------------------#
# Ts-node Install
npm i -D ts-node
# Express Install
npm i express
npm i @types/expressts-node
Node.js에서 Typesciprt 를 실행 시키는 도구
ts 파일을 미리 컴파일하지 않고 바로 실행 시키는 엔진
JIT(Just In Time) 으로 Typescript를 Javascript로 변환하여 실행 가능
Roy Fielding - “Architectural Styles and the Design of Network-based Software Architectures” (2000)
대게 "필딩 제약조건" 4가지를 만족하지 않고, Resource와 Http Verb만 도입하는 수준으로 사용
CRUD에 대해 HTTP Method를 대입.
Last updated