Skip to content

Support async boot scripts OOTB #170

Description

@bajtos

We need to rework server/server.js template to support async boot scripts.

boot(app, __dirname, function(err) {
  if (err) throw err;
  // start the server if `$ node server.js`
  if (require.main === module) {
    app.start();
  });

In order to support the scenario when the app is loaded via require but not started, e.g. in loopback-sdk-angular-cli, we need to modify loopback-boot to emit an event when the boot process is finished, e.g. app.emit('ready').

Tasks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions