How to use the @nestjs/core.NestApplication function in @nestjs/core

To help you get started, weโ€™ve selected a few @nestjs/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nestjs / nest / bundle / testing / testing-module.js View on Github external
createNestApplication(httpServer = express_factory_1.ExpressFactory.create(), options) {
        httpServer = this.applyExpressAdapter(httpServer);
        this.applyLogger(options);
        this.container.setApplicationRef(httpServer);
        return new core_1.NestApplication(this.container, httpServer, this.applicationConfig, options);
    }
    createNestMicroservice(options) {
github nestjs / nest / packages / testing / testing-module.ts View on Github external
public createNestApplication(
    httpAdapter?: HttpServer,
    options?: NestApplicationOptions,
  ): T {
    httpAdapter = httpAdapter || this.createHttpAdapter();

    this.applyLogger(options);
    this.container.setHttpAdapter(httpAdapter);

    const instance = new NestApplication(
      this.container,
      httpAdapter,
      this.applicationConfig,
      options,
    );
    return this.createAdapterProxy(instance, httpAdapter);
  }
github nestjs / nest / lib / testing / testing-module.js View on Github external
createNestApplication(httpServer = express_factory_1.ExpressFactory.create(), options) {
        httpServer = this.applyExpressAdapter(httpServer);
        this.container.setApplicationRef(httpServer);
        return new core_1.NestApplication(this.container, httpServer, this.applicationConfig);
    }
    createNestMicroservice(options) {
github vellengs / nestx-server / dist / testing / testing-module.js View on Github external
createNestApplication(httpServer = express_factory_1.ExpressFactory.create(), options) {
        httpServer = this.applyExpressAdapter(httpServer);
        this.container.setApplicationRef(httpServer);
        return new core_1.NestApplication(this.container, httpServer, this.applicationConfig);
    }
    createNestMicroservice(options) {
github nestjs / nest / src / testing / testing-module.ts View on Github external
public createNestApplication(
    httpServer: HttpServer = ExpressFactory.create(),
  ): INestApplication {
    httpServer = this.applyExpressAdapter(httpServer);
    this.container.setApplicationRef(httpServer);
    return new NestApplication(
      this.container,
      httpServer,
      this.applicationConfig,
    );
  }