Express.js는 Node.js 환경에서 웹 서버 또는 API 서버를 제작하기 위해
사용되는 인기있는 프레임 워크
- 미들웨어 추가가 편리
- 자체 라우터를 제공
1. 설치
npm install express --save : 명령어를 통해 해당 리텍토리에 설치
2. 서버 생성
const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => {
res.send('Hello World!')
})
app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`)
})