forked from ancon/bigscreen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
35 lines (29 loc) · 774 Bytes
/
app.js
File metadata and controls
35 lines (29 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var express=require('express')
var app=express()
//页面文件,使用.html后缀的ejs模板
app.set('views','./templates')
app.engine('html', require('ejs').renderFile)
//静态资源
app.use(express.static(__dirname, '/static'))
// app.get('/',function(req,res){
// res.render('index.html',{})
// })
app.get('/home',function(req,res){
res.render('home.html',{})
})
app.get('/wall',function(req,res){
res.render('wall.html',{})
})
app.get('/lottery',function(req,res){
res.render('lottery.html',{})
})
app.get('/checkin',function(req,res){
res.render('checkin.html',{})
})
app.get('/game',function(req,res){
res.render('game.html',{})
})
//启动服务
var PORT=8000
app.listen(PORT);
console.log('server start at port '+PORT)