1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-16 23:58:59 +09:00
cherrypick/src/server/web/docs.ts
2018-03-29 20:50:45 +09:00

24 lines
373 B
TypeScript

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