1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-14 06:38:24 +09:00
MisskeyIO/src/web/serve-app.ts
Aya Morisawa e52885bfe4
2017-01-03 06:03:19 +09:00

10 lines
277 B
TypeScript

import * as path from 'path';
import * as express from 'express';
import ms = require('ms');
export default (name: string) => (req: express.Request, res: express.Response) => {
res.sendFile(path.resolve(`${__dirname}/app/${name}/view.html`), {
maxAge: ms('7 days')
});
};