How to use @loopback/example-todo - 2 common examples

To help you get started, we’ve selected a few @loopback/example-todo 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 strongloop / loopback-next / benchmark / src / worker.ts View on Github external
async function main() {
  const app = new TodoListApplication({
    rest: {
      host: '127.0.0.1',
      port: 0,
    },
  });

  await app.boot();

  // use in-memory storage without filesystem persistence
  app.bind('datasources.config.db').to({connector: 'memory'});

  // overwrite the error logger to print all failed requests, including 4xx
  app.bind(RestBindings.SequenceActions.LOG_ERROR).to(logAllErrors);

  await app.start();

  // Tell the master thread what is our URL
  console.log('Server listening at', app.restServer.url);
  if (process.send) {
    process.send({url: app.restServer.url});
  }
}
github strongloop / loopback-next / benchmark / src / worker.ts View on Github external
async function main() {
  const app = new TodoListApplication({
    rest: {
      host: '127.0.0.1',
      port: 0,
    },
  });

  await app.boot();

  // use in-memory storage without filesystem persistence
  app.bind('datasources.config.db').to({connector: 'memory'});

  // overwrite the error logger to print all failed requests, including 4xx
  app.bind(RestBindings.SequenceActions.LOG_ERROR).to(logAllErrors);

  await app.start();

@loopback/example-todo

Tutorial example on how to build an application with LoopBack 4

MIT
Latest version published 18 days ago

Package Health Score

84 / 100
Full package analysis