-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.js
19 lines (19 loc) · 633 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require('marko/node-require').install();
require('marko/express'); //enable res.marko
require('lasso').configure('lasso-config.json')
var express = require('express');
var serveStatic = require('serve-static');
var indexTemplate = require('./src/components/app-root/app-root.marko');
var app = express();
var port = 8080;
app.use('/static', serveStatic(__dirname + '/static'));
app.get('/', function (req, res) {
res.marko(indexTemplate, {
});
});
app.listen(port, function () {
console.log('Server started! Try it out:\nhttp://localhost:' + port + '/');
if (process.send) {
process.send('online');
}
});