Skip to content

Commit

Permalink
Clean up hapi server.register calls
Browse files Browse the repository at this point in the history
  • Loading branch information
watson committed Mar 31, 2020
1 parent 9422fd9 commit d10529d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/server/http/base_path_proxy_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class BasePathProxyServer {

// Register hapi plugin that adds proxying functionality. It can be configured
// through the route configuration object (see { handler: { proxy: ... } }).
await this.server.register([HapiProxy]);
await this.server.register(HapiProxy);

if (this.httpConfig.ssl.enabled) {
const tlsOptions = serverOptions.tls as TlsOptions;
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/http/cookie_session_storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export async function createCookieSessionStorageFactory<T>(
}
}

await server.register({ plugin: hapiAuthCookie });
await server.register(hapiAuthCookie);

server.auth.strategy('security-cookie', 'cookie', {
cookie: cookieOptions.name,
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/http/http_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class HttpServer {
const serverOptions = getServerOptions(config);
const listenerOptions = getListenerOptions(config);
this.server = createServer(serverOptions, listenerOptions);
await this.server.register([HapiStaticFiles]);
await this.server.register(HapiStaticFiles);
this.config = config;

const basePathService = new BasePath(config.basePath);
Expand Down
2 changes: 1 addition & 1 deletion src/optimize/bundles_route/__tests__/bundles_route.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('optimizer/bundle route', () => {
} = options;

const server = new Hapi.Server();
server.register([Inert]);
server.register(Inert);

server.route(
createBundlesRoute({
Expand Down

0 comments on commit d10529d

Please sign in to comment.