showing results for - "jsdoc for express routes"
Valeria
10 Mar 2016
1/** Express router providing user related routes
2 * @module routers/users
3 * @requires express
4 */
5
6/**
7 * express module
8 * @const
9 */
10const express = require('express');
11
12/**
13 * Express router to mount user related functions on.
14 * @type {object}
15 * @const
16 * @namespace usersRouter
17 */
18const router = express.Router();
19
20/**
21 * Route serving login form.
22 * @name get/login
23 * @function
24 * @memberof module:routers/users~usersRouter
25 * @inner
26 * @param {string} path - Express path
27 * @param {callback} middleware - Express middleware.
28 */
29router.get('/login', function(req, res, next) {
30  res.render('login', {title: 'Login', message: 'You must login'});
31});
32