var express = require('express'); var router = express.Router(); var ntr = require("../neutral-functions.js") /* GET home page. */ router.get('/', function(req, res, next) { ntr.checkUser() var check = ntr.checkToken(req, res) if(check.name == false) { res.redirect(302, "/login") } else { console.log(ntr.getFullName(check.name)) res.render('index', { title: ntr.getFullName(check.name), username: ntr.getFullName(check.name), accountpic: '' }); } }); module.exports = router;