forked from BabylonJS/OldDocumentationSite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
34 lines (22 loc) · 813 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
34
var express = require('express');
var app = express();
var compress = require('compression');
var favicon = require('serve-favicon');
// The listened port
var port = process.env.PORT || 3000;
app.use(compress());
app.use(favicon(__dirname + '/public/img/favicon.ico'));
// Serve static files (css, js, images)
app.use(express.static('public'));
//let's encrypt
app.use('/.well-known', express.static('.well-known'));
// Set the template engine to jade
app.set('view engine', 'jade');
//app.set('view cache', false);
// Set the views folder to ./views
app.set('views', './views');
//Load th search index into the app
app.locals.indexes = require('./scripts/loadIndexes')('data/search');
//require all routes, index.js is called by default
require('./scripts/router')(app);
module.exports = app;