Create config.local.js
with the following:
var p = require('../package.json');
var version = p.version.split('.').shift();
module.exports = {
restApiRoot: '/api' + (version > 0 ? '/v' + version : ''),
host: process.env.HOST || 'localhost',
port: process.env.PORT || 3000
};
API path's will look like /api/v1
using the app's major version. If the app's major version is 0, then the path is simply /api
.
How can access api versioning in that way in postman??