[■KodeJUN] [7] Node.js 웹서버 express 모듈: get
페이지 정보
작성자 로봇 작성일 25-01-28 11:59 조회 300 댓글 0본문
Installation
Either through cloning with git or by using npm (the recommended way):
npm install -g nodemon
==============================
const express = require('express')
const app = express()
app.listen(3000, () => {
console.log('Server is running on port 3000')
})
app.get('/', (req, res) => {
res.sendFile(__dirname + '/index.html')
})
app.get('/about', (req, res) => {
res.send('about.. <br>abo2222ut.. <br>about.. <br>about.. ')
})
Either through cloning with git or by using npm (the recommended way):
npm install -g nodemon
==============================
const express = require('express')
const app = express()
app.listen(3000, () => {
console.log('Server is running on port 3000')
})
app.get('/', (req, res) => {
res.sendFile(__dirname + '/index.html')
})
app.get('/about', (req, res) => {
res.send('about.. <br>abo2222ut.. <br>about.. <br>about.. ')
})
관련링크
댓글목록 0
등록된 댓글이 없습니다.