refactor: es6 all the things!

This commit is contained in:
Khaled Garbaya
2017-09-20 12:02:27 +02:00
committed by Benedikt Rötsch
parent d1d580f288
commit dc3e8628f3
8 changed files with 94 additions and 48 deletions

14
routes/lessons.js Normal file
View File

@@ -0,0 +1,14 @@
const express = require('express')
const router = express.Router()
/* GET lessons listing. */
router.get('/', function (req, res, next) {
res.render('lessons', { title: 'Lessons' })
})
/* GET lessons listing. */
router.get('/:slug', function (req, res, next) {
res.render('lessons', { title: `Lesson with slug ${req.params.slug}` })
})
module.exports = router