
위 사이트 에서 본인 플랫폼에 맞게 LTS(Long Time Surrport)Download 한다.
npm init
위 명령어 입력후 package.json, package-lock.json 을 생성해준다.
npm install express
express 를 설치한다.
아래 index.js 파일을 작성한다.
import express from "express";
const app = express();
app.get("/", (req, res) => {
res.send("Express Server");
});
app.listen(4000, () => {
console.log(`Server is running at http://localhost:${port}`);
});
node index.js 로 실행 해보면…


잘 나온다!