EjsTestserver.js
635 Bytes
var express = require('express');
var app = express();
var http = require('http');
app.set('views', __dirname+'/views');
app.set('view engine', 'ejs');
app.get('/', function(req, res){
res.render('index');
})
app.get('/timetable', function(req, res) {
res.render('timetable', {
busNum : 9999,
ETD_min_H : '1',
ETD_min_m : '30',
ETD_max_H : '1',
ETD_max_m : '45',
remainTime : '00시간 00분 이상'
});
});
// app.get('/timetable', function(req, res){
// res.send('timetable');
// });
http.createServer(app).listen(23023, function(){
console.log('23023');
});