本文整理匯總了TypeScript中@nestjs/core/application-config.ApplicationConfig類的典型用法代碼示例。如果您正苦於以下問題:TypeScript ApplicationConfig類的具體用法?TypeScript ApplicationConfig怎麽用?TypeScript ApplicationConfig使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ApplicationConfig類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: getServerOfNamespace
private getServerOfNamespace(options: any, port: number, server) {
const adapter = this.applicationConfig.getIoAdapter();
return adapter.create(port, {
...options,
namespace: this.validateNamespace(options.namespace || ''),
server,
});
}
示例2: createSocketServer
private createSocketServer(
options: any,
port: number,
): ObservableSocketServer {
const { namespace, server, ...opt } = options;
const adapter = this.applicationConfig.getIoAdapter();
const ioServer = adapter.create(port, opt);
const observableSocket = ObservableSocket.create(ioServer);
this.socketsContainer.addServer(null, port, observableSocket);
return this.createWithNamespace(options, port, observableSocket);
}
示例3:
public getGlobalMetadata<T extends any[]>(): T {
return this.config.getGlobalFilters() as T;
}