Options

appolo create configuration options, all options are optional

keyDescriptionTypeDefault
pathsfolders that will be required and loaded on appolo launcharray[ 'src']
rootthe root folder of the paths optionstringprocess.cwd()
environmentenvironment file name that will override the settings in environments/all.jsstring(process.env.NODE_ENV or 'development')
startMessagethe message that will be written to console log the the server startsstring'Appolo Server listening on port: {port} version:{version} environment: {environment}'
startServerif true the server will start immediately to listen to port else you will have to start in manually.booleantrue
portthe port that the app will listen to.numberprocess.env.PORT or this._options.port or appolo.environment.port or 8080)
errorMessageprint route http error.toString()booleantrue
errorMessageprint route http error.stackbooleanfalse
maxRouteCachethe max size of route lookup lru cachenumber10000
qsParserfunction for parsing querystring(query:string)=>{[index:string]:any}querystring

Usage#

import {createApp} from '@appolo/core';
(async ()=>{
let app = await createApp({
paths:[ 'src'],
root : process.cwd()+'/app',
environment : 'testing',
port:8182
}).launch();
})();