summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-09 05:23:01 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-09 05:23:01 +0900
commit9da00b9947fea0634a4b339aee028bf64722dfb3 (patch)
treea23eb5af3a229537da2f0bd536344b010fa8af29 /src
parentMerge branch 'master' of https://github.com/syuilo/misskey (diff)
downloadsharkey-9da00b9947fea0634a4b339aee028bf64722dfb3.tar.gz
sharkey-9da00b9947fea0634a4b339aee028bf64722dfb3.tar.bz2
sharkey-9da00b9947fea0634a4b339aee028bf64722dfb3.zip
Refactor
Diffstat (limited to 'src')
-rw-r--r--src/web/apple-touch-icon.ts8
-rw-r--r--src/web/manifest.ts6
-rw-r--r--src/web/server.ts4
3 files changed, 2 insertions, 16 deletions
diff --git a/src/web/apple-touch-icon.ts b/src/web/apple-touch-icon.ts
deleted file mode 100644
index 32e1840405..0000000000
--- a/src/web/apple-touch-icon.ts
+++ /dev/null
@@ -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;
diff --git a/src/web/manifest.ts b/src/web/manifest.ts
deleted file mode 100644
index e87b0ee328..0000000000
--- a/src/web/manifest.ts
+++ /dev/null
@@ -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;
diff --git a/src/web/server.ts b/src/web/server.ts
index 5bff450aa3..52b3c952ed 100644
--- a/src/web/server.ts
+++ b/src/web/server.ts
@@ -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')
}));