blob: 1ab2ba37c3e078e3f1215ff70f74a8226b7de094 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
'use strict'
const express = require('express')
const router = express.Router()
const users = require('../lib/getUserIndex')
/* GET home page. */
router.get('/', function (req, res, next) {
let flags = []
if (req.query.nfd != null) {
flags.push('NO_FEATURE_DETECT')
}
const flagsStr = `var FLAGS = ${JSON.stringify(flags)};`
const usersStr = `var USERS = ${JSON.stringify(users.users)};`
res.render('index', { flagsStr, usersStr })
})
module.exports = router
|