Refactor
This commit is contained in:
parent
d3577296c0
commit
9da00b9947
|
@ -1,8 +0,0 @@
|
||||||
import * as path from 'path';
|
|
||||||
import * as express from 'express';
|
|
||||||
|
|
||||||
const app = express.Router();
|
|
||||||
app.get('/apple-touch-icon.png', (req, res) =>
|
|
||||||
res.sendFile(path.resolve(__dirname + '/../../resources/apple-touch-icon.png')));
|
|
||||||
|
|
||||||
module.exports = app;
|
|
|
@ -1,6 +0,0 @@
|
||||||
import * as express from 'express';
|
|
||||||
|
|
||||||
const app = express.Router();
|
|
||||||
app.get('/manifest.json', (req, res) => res.sendFile(__dirname + '/../../resources/manifest.json'));
|
|
||||||
|
|
||||||
module.exports = app;
|
|
|
@ -35,8 +35,8 @@ app.use((req, res, next) => {
|
||||||
* Static resources
|
* Static resources
|
||||||
*/
|
*/
|
||||||
app.use(favicon(`${__dirname}/resources/favicon.ico`));
|
app.use(favicon(`${__dirname}/resources/favicon.ico`));
|
||||||
app.use(require('./manifest'));
|
app.get('/manifest.json', (req, res) => res.sendFile(__dirname + '/resources/manifest.json'));
|
||||||
app.use(require('./apple-touch-icon'));
|
app.get('/apple-touch-icon.png', (req, res) => res.sendFile(__dirname + '/resources/apple-touch-icon.png'));
|
||||||
app.use('/_/resources', express.static(`${__dirname}/resources`, {
|
app.use('/_/resources', express.static(`${__dirname}/resources`, {
|
||||||
maxAge: ms('7 days')
|
maxAge: ms('7 days')
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue