mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-24 21:19:07 +01:00
22 lines
334 B
TypeScript
22 lines
334 B
TypeScript
|
/**
|
||
|
* 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;
|