728x90
반응형
테스트 방법 : http://localhost:3010/
==> 끝에 '/' 를 붙인다.
==========================================================
const express = require('express')
const app = express();
app.get('/', function(req,res) {
res.send('hello world')
})
app.get('/hello', function(req,res) {
res.send('hello again...')
})
app.listen(3010)
console.log('server is running')
==========================================================
728x90
반응형
'IT > JavaScript와 Framework' 카테고리의 다른 글
미들웨어 사용 예제 (0) | 2021.06.17 |
---|---|
nodemon 모듈 - 서버 자동 재기동 모듈 (0) | 2021.06.16 |
express 프레임 웍 사용예제 (0) | 2021.06.16 |
express 프로젝트 만들기 (0) | 2021.06.16 |
npm 간단한 사용법 (0) | 2021.06.15 |
댓글