-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
34 lines (28 loc) · 733 Bytes
/
app.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
33
/* Module deps */
var express = require( 'express' )
, stylus = require( 'stylus' )
, nib = require( 'nib' )
var xml = ''
var app = express()
function compile( str, path ) {
return stylus( str )
.set( 'filename', path )
.use( nib() )
}
app.set( 'views', __dirname + '/views' )
app.set( 'view engine', 'jade' )
app.use( express.logger( 'dev' ) )
app.use( express.bodyParser() )
app.use( express.cookieParser() )
app.use( express.session({ secret: 'super-duper-secret-secret' }));
app.use( stylus.middleware(
{
src: __dirname + '/public'
, compile: compile
}
))
app.use( express.static( __dirname + '/public' ) )
require('./router.js')(app)
var port = 80
app.listen( port )
console.log( "Listening on port " + port )