Created
January 23, 2017 22:04
-
-
Save jamesjara/d83543e40a5f2f4f2ce59c5db668f484 to your computer and use it in GitHub Desktop.
V1 versioning prefix for the REST path strongloop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment