|
|
@ -73,6 +73,7 @@ connect.createServer( |
|
|
|
}); |
|
|
|
}); |
|
|
|
}), |
|
|
|
}), |
|
|
|
// Otherwise, static
|
|
|
|
// Otherwise, static
|
|
|
|
|
|
|
|
connect.staticCache(), |
|
|
|
connect.static(__dirname + '/static', { maxAge: config.staticMaxAge }), |
|
|
|
connect.static(__dirname + '/static', { maxAge: config.staticMaxAge }), |
|
|
|
// Then we can loop back - and everything else should be a token,
|
|
|
|
// Then we can loop back - and everything else should be a token,
|
|
|
|
// so route it back to /index.html
|
|
|
|
// so route it back to /index.html
|
|
|
@ -82,7 +83,6 @@ connect.createServer( |
|
|
|
next(); |
|
|
|
next(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}), |
|
|
|
}), |
|
|
|
// And then let static take over
|
|
|
|
|
|
|
|
connect.static(__dirname + '/static', { maxAge: config.staticMaxAge }) |
|
|
|
connect.static(__dirname + '/static', { maxAge: config.staticMaxAge }) |
|
|
|
).listen(config.port, config.host); |
|
|
|
).listen(config.port, config.host); |
|
|
|
|
|
|
|
|
|
|
|