This commit is contained in:
syuilo 2017-02-09 05:23:01 +09:00
parent 5e8ff199ce
commit 784533cb11
3 changed files with 2 additions and 16 deletions

View File

@ -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;

View File

@ -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;

View File

@ -35,8 +35,8 @@ app.use((req, res, next) => {
* Static resources
*/
app.use(favicon(`${__dirname}/resources/favicon.ico`));
app.use(require('./manifest'));
app.use(require('./apple-touch-icon'));
app.get('/manifest.json', (req, res) => res.sendFile(__dirname + '/resources/manifest.json'));
app.get('/apple-touch-icon.png', (req, res) => res.sendFile(__dirname + '/resources/apple-touch-icon.png'));
app.use('/_/resources', express.static(`${__dirname}/resources`, {
maxAge: ms('7 days')
}));