@@ -28,7 +28,7 @@ export async function bootstrap(userConfig: Partial<VendureConfig>): Promise<INe
});
await runPluginOnBootstrapMethods(config, app);
- await app.listen(config.port);
+ await app.listen(config.port, config.hostname);
return app;
}
@@ -23,6 +23,7 @@ export const defaultConfig: ReadOnlyRequired<VendureConfig> = {
channelTokenKey: 'vendure-token',
defaultChannelToken: null,
defaultLanguageCode: LanguageCode.en,
+ hostname: '',
port: API_PORT,
cors: {
origin: true,
@@ -214,6 +214,10 @@ export interface VendureConfig {
* Set the CORS handling for the server.
*/
cors?: boolean | CorsOptions;
+ /**
+ * Set the hostname of the server.
+ */
+ hostname?: string;
/**
* Which port the Vendure server should listen on.