UNPKG

prime-website

Version:

Website for Prime

31 lines (23 loc) 561 B
"use strict"; var app = require('mootools-microsite'); var express = app.express; var routes = function(app){ app.use(function setPath(req, res, next){ res.locals.path = app.path(); next(); }); app.get('/', require('./routes/index')); app.get('/docs', require('./routes/docs')); app.get('/docs/:version', require('./routes/docs')); return app; }; var statics = function(app){ app.use('/', express.static(__dirname + '/public')); return app; }; app({ routes: routes, static: statics, dirname: __dirname, port: process.env.PORT || 3001 });