-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
29 lines (23 loc) · 1.04 KB
/
app.js
File metadata and controls
29 lines (23 loc) · 1.04 KB
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
var express = require('express');
var app = module.exports = express();
app.set('views', __dirname + '/app');
app.set('view engine', 'pug');
app.locals.basedir = __dirname;
var assetsPathConfig = require('./assets/pretzel_config.js').getPathConfig();
var manifests = {};
if (false) {
manifests.files = require('./public/build/manifest-files.json');
manifests.entriesAndDll = require('./public/build/manifest-entries+dll.json');
manifests.stylesheets = require('./public/build/manifest-stylesheets.json');
}
app.locals.assets = require('pretzel-assets-pipeline/helper/asset-path')(manifests.files, assetsPathConfig);
app.locals.serverAssets = require('pretzel-assets-pipeline/helper/server-asset-path')(manifests.entriesAndDll, manifests.stylesheets, assetsPathConfig);
app.get('/', function (req, res) {
res.render('blub', { test: 'my var' });
});
app.get('/solo', function (req, res) {
res.render('solo', { test: 'my var' });
});
app.use(express.static('./public/'));
var port = 5000;
app.listen(port, () => console.log('pug-test running on ' + port));