diff --git a/packages/thrift-integration/src/calculator-strict-unions.ts b/packages/thrift-integration/src/calculator-strict-unions.ts index 3c02c423..82a3fd3a 100644 --- a/packages/thrift-integration/src/calculator-strict-unions.ts +++ b/packages/thrift-integration/src/calculator-strict-unions.ts @@ -184,6 +184,7 @@ export async function createServer( * Creates Hapi server with thrift endpoint. */ const server: Hapi.Server = await createThriftServer({ + address: HAPI_CALC_SERVER_STRICT_CONFIG.hostName, port: HAPI_CALC_SERVER_STRICT_CONFIG.port, path: HAPI_CALC_SERVER_STRICT_CONFIG.path, thriftOptions: { diff --git a/packages/thrift-integration/src/hapi-add-service.ts b/packages/thrift-integration/src/hapi-add-service.ts index 78f2f02b..a8acbe2a 100644 --- a/packages/thrift-integration/src/hapi-add-service.ts +++ b/packages/thrift-integration/src/hapi-add-service.ts @@ -33,6 +33,7 @@ export async function createServer(sampleRate = 0): Promise { * Creates Hapi server with thrift endpoint. */ const server: Hapi.Server = await createThriftServer({ + address: ADD_SERVER_CONFIG.hostName, port: ADD_SERVER_CONFIG.port, path: ADD_SERVER_CONFIG.path, thriftOptions: { diff --git a/packages/thrift-integration/src/hapi-calculator-service.ts b/packages/thrift-integration/src/hapi-calculator-service.ts index 56fbaa85..0b60620d 100644 --- a/packages/thrift-integration/src/hapi-calculator-service.ts +++ b/packages/thrift-integration/src/hapi-calculator-service.ts @@ -169,6 +169,7 @@ export async function createServer( * Creates Hapi server with thrift endpoint. */ const server: Hapi.Server = await createThriftServer({ + address: HAPI_CALC_SERVER_CONFIG.hostName, port: HAPI_CALC_SERVER_CONFIG.port, path: HAPI_CALC_SERVER_CONFIG.path, thriftOptions: { diff --git a/packages/thrift-server-hapi/src/main/index.ts b/packages/thrift-server-hapi/src/main/index.ts index a8b479be..3e05ce0a 100644 --- a/packages/thrift-server-hapi/src/main/index.ts +++ b/packages/thrift-server-hapi/src/main/index.ts @@ -18,6 +18,7 @@ export function createThriftServer ): Promise { const server = new Hapi.Server({ + address: options.address, port: options.port, debug: { request: ['error'] }, }) diff --git a/packages/thrift-server-hapi/src/main/types.ts b/packages/thrift-server-hapi/src/main/types.ts index 3aedaee7..7ac046e1 100644 --- a/packages/thrift-server-hapi/src/main/types.ts +++ b/packages/thrift-server-hapi/src/main/types.ts @@ -37,7 +37,8 @@ export interface IHapiPluginOptions> extends IHapiPluginOptions { - port: number + address?: Hapi.ServerOptions['address'] + port?: Hapi.ServerOptions['port'] } export type ThriftHapiPlugin = Hapi.Plugin