app.js
507 Bytes
//express 모듈 선언
var express = require('express')
var path = require('path');
//express 라우팅 객체 생성
var app = express()
app.set('views',path.join(__dirname,'views'))
app.set('view engine','ejs')
//기본라우팅
app.get('/',function(req,res){
res.render('index',{
title:'Reminder-Talk',
msg :'Hello. This is Reminder-Talk!' })
})
//웹서버시작 with 8080 포트
app.listen(8080,function(){
console.log("server starting with 8080")
})
//module.exports = app;