How to use the @tsed/common.ServerLoader.bootstrap function in @tsed/common

To help you get started, we’ve selected a few @tsed/common 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 TranBaVinhSon / microservice_nodejs_template / packages / api_gateway / src / index.ts View on Github external
async function bootstrap(): Promise {
  try {
    $log.debug("Start server...");
    const server = await ServerLoader.bootstrap(Server);

    await server.listen();
    $log.debug("Server initialized");
    Logger(); // hello, world
  } catch (er) {
    $log.error(er);
  }
}
github TypedProject / ts-express-decorators / test / integration / app / app.ts View on Github external
async function bootstrap() {
    try {
      const server = await ServerLoader.bootstrap(ExampleServer);
      await server.listen();
    } catch (er) {
      console.error(er);
    }
  }
github TypedProject / ts-express-decorators / integration / socketio / src / index.ts View on Github external
async function bootstrap() {
  try {
    $log.debug("Start server...");
    const server = await ServerLoader.bootstrap(Server);

    await server.listen();
    $log.debug("Server initialized");
  } catch (er) {
    $log.error(er);
  }
}
github TranBaVinhSon / microservice_nodejs_template / packages / backend / src / index.ts View on Github external
async function bootstrap() {
  try {
    $log.debug("Start server...");
    const server = await ServerLoader.bootstrap(Server);

    await server.listen();
    $log.debug("Server initialized");
    Logger();
  } catch (er) {
    $log.error(er);
  }
}
github TypedProject / ts-express-decorators / examples / aws / src / LambdaServer.ts View on Github external
export async function awsHanlder(event: any, context: any, done: any) {
  const server = await ServerLoader.bootstrap(Server);
  const lambdaServer = awsServerlessExpress.createServer(server.expressApp, null, binaryMimeTypes);

  awsServerlessExpress.proxy(lambdaServer, event, context);

  done();
}
github TypedProject / ts-express-decorators / examples / getting-started / src / index.ts View on Github external
async function bootstrap() {
  try {
    $log.debug("Start server...");
    const server = await ServerLoader.bootstrap(Server, {});

    await server.listen();
    $log.debug("Server initialized");
  } catch (er) {
    $log.error(er);
  }
}
github TypedProject / ts-express-decorators / examples / passportjs / src / index.ts View on Github external
async function bootstrap() {
  try {
    $log.debug("Start server...");
    const server = await ServerLoader.bootstrap(Server);

    await server.listen();
    $log.debug("Server initialized");
  } catch (er) {
    $log.error(er);
  }
}
github TypedProject / ts-express-decorators / integration / session / src / index.ts View on Github external
async function bootstrap() {
  try {
    $log.debug("Start server...");
    const server = await ServerLoader.bootstrap(Server);

    await server.listen();
    $log.debug("Server initialized");
  } catch (er) {
    $log.error(er);
  }
}
github TypedProject / ts-express-decorators / integration / typeorm / src / index.ts View on Github external
async function bootstrap() {
  try {
    $log.debug("Start server...");
    const server = await ServerLoader.bootstrap(Server);

    await server.listen();
    $log.debug("Server initialized");
  } catch (er) {
    $log.error(er);
  }
}