| Conditions | 1 |
| Paths | 1 |
| Total Lines | 37 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | "use strict"; |
||
| 26 | wrapper.start = () => { |
||
| 27 | taskLogger.starting(); |
||
| 28 | |||
| 29 | routeList.forEach(route => { |
||
| 30 | server.route(route); |
||
| 31 | }); |
||
| 32 | |||
| 33 | const options = { |
||
| 34 | 'info': { |
||
| 35 | 'title': pkg.name, |
||
| 36 | 'version': pkg.version |
||
| 37 | } |
||
| 38 | }; |
||
| 39 | |||
| 40 | return server.register([ |
||
| 41 | Inert, |
||
| 42 | Vision, |
||
| 43 | { |
||
| 44 | 'register': HapiSwagger, |
||
| 45 | 'options': options |
||
| 46 | }] |
||
| 47 | ) |
||
| 48 | .then(err => server.start()) |
||
|
|
|||
| 49 | .then(() => { |
||
| 50 | serverStarted = true; |
||
| 51 | taskLogger.started(); |
||
| 52 | taskLogger.info(`Running at ${server.info.uri}`); |
||
| 53 | }) |
||
| 54 | .catch(error => { |
||
| 55 | taskLogger.error('Stopping after an error'); |
||
| 56 | return wrapper.stop() |
||
| 57 | .then(() => { |
||
| 58 | return Promise.reject(error); |
||
| 59 | }) |
||
| 60 | ; |
||
| 61 | }); |
||
| 62 | }; |
||
| 63 | |||
| 80 |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.