Node.js

· Node.js
💡 Express 웹 서버 구축 🔨 Express.js 웹 애플리케이션 혹은 API 서버를 구축하는 데 가장 많이 사용되는 대표적인 프레임워크 설치 npm install express app.js 생성해보기 const express = require("express"); const app = express(); const PORT = 3000; //클라이언트에서 HTTP 요청 메소드 중 GET을 이용해서 'host:port'로 요청을 보내면 실행되는 라우터이다. app.get("/", (req, res) => { res.send("Hello world!"); }); // app.listen() 함수를 호출하여 서버를 실행 // 클라이언트는 'host:port'로 노드 서버에 요청을 보낼 수 있다. app..
runnnerDevHong
'Node.js' 카테고리의 글 목록