MCPcopy
hub / github.com/hapijs/hapi / constructor

Method constructor

lib/core.js:115–137  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

113 };
114
115 constructor(options) {
116
117 const { settings, type } = internals.setup(options);
118
119 this.settings = settings;
120 this.type = type;
121
122 this.heavy = new Heavy(this.settings.load);
123 this.mime = new Mimos(this.settings.mime);
124 this.router = new Call.Router(this.settings.router);
125 this.states = new Statehood.Definitions(this.settings.state);
126
127 this._debug();
128 this._initializeCache();
129
130 if (this.settings.routes.validate.validator) {
131 this.validator = Validation.validator(this.settings.routes.validate.validator);
132 }
133
134 this.listener = this._createListener();
135 this._initializeListener();
136 this.info = this._info();
137 }
138
139 _debug() {
140

Callers

nothing calls this directly

Calls 6

_debugMethod · 0.80
_initializeCacheMethod · 0.80
validatorMethod · 0.80
_createListenerMethod · 0.80
_initializeListenerMethod · 0.80
_infoMethod · 0.80

Tested by

no test coverage detected