Skip to content

Instantly share code, notes, and snippets.

@cpjk
Last active August 29, 2015 14:21
Show Gist options
  • Save cpjk/49968e8865d22d4fd788 to your computer and use it in GitHub Desktop.
Save cpjk/49968e8865d22d4fd788 to your computer and use it in GitHub Desktop.
// controllers/home_controller.js
var homeController = {
index: function(req, res, next) {
res.render('index', { title: 'Express', fuck: 'FUCK' });
}
}
module.exports = homeController;
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
//routers/index.js
var express = require('express');
var router = express.Router();
var homeController = require('controllers/home_controller')
/* GET home page. */
router.get('/', homeController.index);
module.exports = router;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment