This commit is contained in:
syuilo
2018-03-29 20:50:45 +09:00
parent af1a533d13
commit d68cc702a5
2 changed files with 5 additions and 3 deletions

View File

@ -1,21 +0,0 @@
/**
* Docs Server
*/
import * as express from 'express';
/**
* Init app
*/
const app = express();
app.disable('x-powered-by');
app.use('/assets', express.static(`${__dirname}/assets`));
/**
* Routing
*/
app.get(/^\/([a-z_\-\/]+?)$/, (req, res) =>
res.sendFile(`${__dirname}/${req.params[0]}.html`));
module.exports = app;