users.js 919 Bytes
var express = require('express');
var IoC = require('electrolyte');

exports = module.exports = function (settings) {
  var app = this;
  var router = express.Router();
  var controller = {
    get: function () {

    }, post: function () {

    }, put: function () {

    }, patch: function () {

    }, head: function () {

    }, patch: function () {

    }, delete: function () {

    }
  };

  router.get(
    '/*',
    controller.get
  );

  router.post(
    '/*',
    controller.post
  );

  router.put(
    '/*',
    controller.put
  );

  router.patch(
    '/*',
    controller.patch
  );

  router.head(
    '/*',
    controller.head
  );

  router.delete(
    '/*',
    controller.delete
  );

  app.use('/api', router);
  app.use('/', function (req, res, next) {
    res.render('index', { 'csrfToken': 'xxxx' });
    next();
  });
};

exports['@singleton'] = true;
exports['@require'] = ['igloo/settings'];