Skip to content
Myr

api_v2.js

This file

Path

examples/multi-router/controllers/api_v2.js

15 lines · 272 bytes · JavaScript

Last changed by

examples: use strict modeDouglas Christopher Wilsonbefore adoption20047bb

History of this file

Take it

The walk stopped after 200 commits: lines older than 76bf96e point at it.

examples: use strict modeDouglas Christopher Wilsonbefore adoption20047bb

lines 1–2why, one step back
1'use strict'
2

deps: finalhandler@1.1.1Douglas Christopher Wilsonbefore adoption76bf96e

lines 3–15why, one step back
3var express = require('../../..');
45var apiv2 = express.Router();67apiv2.get('/', function(req, res) {8 res.send('Hello from APIv2 root route.');9});1011apiv2.get('/users', function(req, res) {12 res.send('List of APIv2 users.');13});1415module.exports = apiv2;