Better arg parsing for main

This commit is contained in:
Bryan Ashby 2017-02-09 21:08:23 -07:00
parent 2e7862043d
commit f9e91987ac
3 changed files with 28 additions and 19 deletions

View file

@ -107,13 +107,13 @@ exports.getModule = class WebServerModule extends ServerModule {
route = new Route(route);
if(!route.isValid()) {
Log( { route : route }, 'Cannot add route: missing or invalid required members' );
Log.warn( { route : route }, 'Cannot add route: missing or invalid required members' );
return false;
}
const routeKey = route.getRouteKey();
if(routeKey in this.routes) {
Log( { route : route }, 'Cannot add route: duplicate method/path combination exists' );
Log.warn( { route : route }, 'Cannot add route: duplicate method/path combination exists' );
return false;
}