login.js
592 Bytes
var express = require('express');
var workaiExpress = require('workai-express');
var IoC = workaiExpress.IoC;
exports = module.exports = function (settings, logger) {
var app = this;
var router = express.Router();
router.get('/', function (req, res, next) {
res.render('index.html', { 'csrfToken': 'xxxx' });
});
router.post('/login', function (req, res, next) {
logger.info(req.body);
res.send({ 'csrfToken': 'xxxx' });
});
app.use('/', router);
};
exports['@singleton'] = true;
exports['@require'] = ['igloo/settings', 'igloo/logger'];