웹서버1 [node.js]서버 구축하기 Express Express 는 Node.js의 프레임워크의 일종으로 간편하게 웹서버를 구축할 수 있다. 우선 Express를 설치해보자. $ npm install express --save Express로 서버생성을 하기 위해서 다음과 같이 구성하면 된다. 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}`)) 그리고 Router로 request를 처리해주면 http://localhost:.. 2020. 5. 22. 이전 1 다음