public AbstractConsole(String name) { // set mode as quickly as possible (can still be changed before configure()) this.ninjaMode = NinjaModeHelper.determineModeFromSystemPropertiesOrProdIfNotSet(); this.name = name; this.configured = false; this.started = false; }
NinjaModeHelper.determineModeFromSystemPropertiesOrProdIfNotSet());
/** * Start the server and load the routes. */ public void startServer(NinjaMode ninjaMode) { if (ninjaMode == null) { NinjaPropertiesImpl ninjaProperties = new NinjaPropertiesImpl( NinjaModeHelper.determineModeFromSystemPropertiesOrProdIfNotSet()); ninjaBootup = new Bootstrap( ninjaProperties); } else { // in this case servletContext can be null NinjaPropertiesImpl ninjaProperties = new NinjaPropertiesImpl(ninjaMode); ninjaBootup = new Bootstrap(ninjaProperties); } ninjaBootup.boot(); router = ninjaBootup.getInjector().getInstance(Router.class); }