var express = require('express');
var router = express.Router();

var indexCtrl = require('../controllers/index.ctrl');
var userCtrl = require('../controllers/user.ctrl');

/* GET home page. */
router.get('/', indexCtrl.default);

/* User register */
router.get('/join', userCtrl.getRegister);
router.post('/register', userCtrl.register);

/* User login */
router.get('/login', userCtrl.getLogin);
router.post('/login', userCtrl.login);

/* GET user page. */
router.get('/:user', userCtrl.default);

module.exports = router;

@@ -164,16 +164,74 @@
 .ctrl');
+%0Avar coursesCtrl = require('../controllers/courses.ctrl');
 %0A%0A/* GET
@@ -493,47 +493,300 @@
 );%0A%0A
-/* GET user page. */%0Arouter.get('/:user
+router.get('/courses', coursesCtrl.list);%0Arouter.get('/courses/new', coursesCtrl.getCreate);%0Arouter.post('/courses', coursesCtrl.create);%0A%0A// User page%0Arouter.get('/:user', userCtrl.default);%0A%0A// User courses%0A// router.get('/:user/courses/create', coursesCtrl.create);%0A%0Arouter.get('/following
 ', u

add courses routes