1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-17 08:09:14 +09:00
cherrypick/src/client/docs/server.ts

22 lines
334 B
TypeScript
Raw Normal View History

2017-12-17 01:41:22 +09:00
/**
* 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;