showing results for - "api version control v1 v2 in nodejs 28loosely coupled 29"
Jada
10 Nov 2018
1import * as express from 'express';
2
3// v1/get-ride.js
4const router = express.Router();
5router.post('/rides/:id', dep.verifyToken(), (req, res) => {
6    // Your code
7});
8app.use('/v1', router);
9
10
11// v2/get-ride.js
12const router = express.Router();
13router.post('/rides/:id', dep.verifyToken(), (req, res) => {
14    // Your code
15});
16app.use('/v2', router);
17