2016-12-28 22:49:51 +00:00
|
|
|
import * as path from 'path';
|
|
|
|
import * as express from 'express';
|
2017-01-02 21:03:19 +00:00
|
|
|
import ms = require('ms');
|
2016-12-28 22:49:51 +00:00
|
|
|
|
|
|
|
export default (name: string) => (req: express.Request, res: express.Response) => {
|
|
|
|
res.sendFile(path.resolve(`${__dirname}/app/${name}/view.html`), {
|
|
|
|
maxAge: ms('7 days')
|
|
|
|
});
|
|
|
|
};
|