diff options
author | Noah Loomans <noahloomans@gmail.com> | 2017-03-22 12:47:25 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2017-03-22 12:47:25 +0100 |
commit | 0f77408d646590273bcadb17e12256e93fee9600 (patch) | |
tree | 469c0e70587021df9f4655ad464c9b57d191f768 /routes/manifest.js | |
parent | 975c3f20a32b7bdd0f263c1482deb0fba7251912 (diff) |
Add BETA to the title when BETA env is set to 1
Diffstat (limited to 'routes/manifest.js')
-rw-r--r-- | routes/manifest.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/routes/manifest.js b/routes/manifest.js new file mode 100644 index 0000000..377b7be --- /dev/null +++ b/routes/manifest.js @@ -0,0 +1,18 @@ +'use strict' + +const express = require('express') +const router = express.Router() + +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: './public' }) + } else { + res.sendFile('manifest.webmanifest', { root: './public' }) + } +}) + +module.exports = router |