1//version taken out from header
2
3 app.use(function(req, res, next)
4 {
5 req.version = req.headers['accept-version'];
6 console.log(req.version);
7 next();
8 });
9
10 //version path defined
11
12 app.use('/api', versionRoutes({
13 "1.0.0": respondV1,
14 "2.0.0": respondV2
15 }));
16
17 function respondV1(req, res, next)
18 {
19 app.use('/api',routeV1);
20 next();
21 }
22 function respondV2(req, res, next)
23 {
24 app.use('/api',routeV2);
25 next();
26 }*
27