mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-08 20:13:08 +02:00
23 lines
373 B
TypeScript
23 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;
|