aboutsummaryrefslogtreecommitdiff
path: root/routes/manifest.js
diff options
context:
space:
mode:
Diffstat (limited to 'routes/manifest.js')
-rw-r--r--routes/manifest.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/routes/manifest.js b/routes/manifest.js
new file mode 100644
index 0000000..b2ce55f
--- /dev/null
+++ b/routes/manifest.js
@@ -0,0 +1,19 @@
+'use strict'
+
+const express = require('express')
+const router = express.Router()
+const path = require('path')
+
+router.get('/', function (req, res, next) {
+ console.log('got a request')
+
+ const isBeta = process.env.BETA === '1'
+
+ if (isBeta) {
+ res.sendFile('manifest.beta.webmanifest', { root: path.join(__dirname, '../public') })
+ } else {
+ res.sendFile('manifest.webmanifest', { root: path.join(__dirname, '../public') })
+ }
+})
+
+module.exports = router