Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jsdoc for express routes

/** Express router providing user related routes
 * @module routers/users
 * @requires express
 */

/**
 * express module
 * @const
 */
const express = require('express');

/**
 * Express router to mount user related functions on.
 * @type {object}
 * @const
 * @namespace usersRouter
 */
const router = express.Router();

/**
 * Route serving login form.
 * @name get/login
 * @function
 * @memberof module:routers/users~usersRouter
 * @inner
 * @param {string} path - Express path
 * @param {callback} middleware - Express middleware.
 */
router.get('/login', function(req, res, next) {
  res.render('login', {title: 'Login', message: 'You must login'});
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: pass variable to partial view ejs 
Javascript :: optional chaining in js 
Javascript :: vue reset all data to default 
Javascript :: how to change css variable in javascript 
Javascript :: check object has key 
Javascript :: how to replace empty string with undefined 
Javascript :: React 18 to 17 
Javascript :: my vscode does not recognize react code syntax 
Javascript :: convert table to excel reactjs 
Javascript :: next.js index page 
Javascript :: make country flags in js 
Javascript :: Web Geolocation API 
Javascript :: how to get data send from a form express 
Javascript :: usehistory hook 
Javascript :: repeat a function javascript 
Javascript :: display image on button click javascript 
Javascript :: array fill 
Javascript :: javascript fore each break example 
Javascript :: jquery: get selected option of the drop down list 
Javascript :: expect any function jest 
Javascript :: upload file angular 
Javascript :: javascript disable div 
Javascript :: how to get in an object js 
Javascript :: How to make remove buttoon on table using js DOM 
Javascript :: execcommand js 
Javascript :: parse json c# 
Javascript :: check user login or not in Shopify 
Javascript :: how to get table last row id in jquery 
Javascript :: google script check if cell is empty 
Javascript :: javascript sleep 1 second" 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =