Skip to content

Instantly share code, notes, and snippets.

@jamesjara
Created January 23, 2017 22:04
Show Gist options
  • Save jamesjara/d83543e40a5f2f4f2ce59c5db668f484 to your computer and use it in GitHub Desktop.
Save jamesjara/d83543e40a5f2f4f2ce59c5db668f484 to your computer and use it in GitHub Desktop.
V1 versioning prefix for the REST path strongloop
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