1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-02 16:58:49 +09:00
This commit is contained in:
syuilo 2017-02-13 12:59:36 +09:00
parent 88f736fa9b
commit abe8127840
2 changed files with 19 additions and 13 deletions

18
src/web/about/index.ts Normal file
View File

@ -0,0 +1,18 @@
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;

View File

@ -62,19 +62,7 @@ app.use(subdomain({
/** /**
* Routing * Routing
*/ */
app.use(require('./about')); // about docs
app.use('/@/about/resources', express.static(`${__dirname}/about/resources`, {
maxAge: ms('7 days')
}));
app.get('/@/about/', (req, res) => {
res.sendFile(`${__dirname}/about/pages/index.html`);
});
app.get('/@/about/:page(*)', (req, res) => {
res.sendFile(`${__dirname}/about/pages/${req.params.page}.html`);
});
app.get('/@/auth/*', serveApp('auth')); // authorize form app.get('/@/auth/*', serveApp('auth')); // authorize form
app.get('/@/dev/*', serveApp('dev')); // developer center app.get('/@/dev/*', serveApp('dev')); // developer center
app.get('*', serveApp('client')); // client app.get('*', serveApp('client')); // client