summaryrefslogtreecommitdiff
path: root/src/web/serve-app.ts
blob: a298d593aac8d825cf51a03d0465bfb19124e2e6 (plain)
1
2
3
4
5
6
7
8
9
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')
	});
};