✌️
This commit is contained in:
parent
b563a67b8a
commit
0769566408
24 changed files with 65 additions and 42 deletions
21
src/web/docs/server.ts
Normal file
21
src/web/docs/server.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue