mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-17 11:08:58 +01:00
18 lines
434 B
TypeScript
18 lines
434 B
TypeScript
import * as express from 'express';
|
|
import ms = require('ms');
|
|
|
|
const router = express.Router();
|
|
|
|
router.use('/@/about/resources', express.static(`${__dirname}/resources`, {
|
|
maxAge: ms('7 days')
|
|
}));
|
|
|
|
router.get('/@/about/', (req, res) => {
|
|
res.sendFile(`${__dirname}/pages/index.html`);
|
|
});
|
|
|
|
router.get('/@/about/:page(*)', (req, res) => {
|
|
res.sendFile(`${__dirname}/pages/${req.params.page}.html`);
|
|
});
|
|
|
|
module.exports = router;
|