-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgog.js
32 lines (25 loc) · 789 Bytes
/
gog.js
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
var config = require("./config.js");
// express setup
var express = require("express");
var app = express.createServer();
var stylus = require("stylus");
app.configure(function(){
this.set('views', __dirname + '/views');
this.set('view engine', 'html');
this.register(".html", require("jqtpl").express);
this.use(express.bodyParser());
this.use(express.methodOverride());
this.use(stylus.middleware({
src: __dirname + '/src',
dest: config.staticFolder,
compile: function(str) {
return stylus(str).set('compress', true);
}
}));
this.use(app.router);
this.use(express.static(config.staticFolder));
});
app.get('/', function(req, res){
res.render('index');
});
app.listen(config.port, config.ip);