var express = require('express'); var router = express.Router(); var auth = require("../bin/auth") /* GET home page. */ router.get('/', function(req, res, next) { if(!auth.check(req.cookies.token)) { res.clearCookie('token') res.redirect(302, "/login") } else { if(process.env.DEV ) { res.render('index', {dev: "
DÉVELOPEMENT
"}); } else { res.render('index', {dev: ""}); } } }); module.exports = router;