forked from BabylonJS/OldDocumentationSite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
31 lines (20 loc) · 707 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
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/html/img/favicon.ico'));
// Serve static files (css, js, images)
app.use(express.static('public/html'));
//let's encrypt
app.use('/.well-known', express.static('.well-known'));
// Set the template engine to pug
app.set('view engine', 'pug');
//app.set('view cache', false);
// Set the views folder to ./views
app.set('views', './views');
//require all routes, index.js is called by default
require('./scripts/router')(app);
module.exports = app;