Loopback-next: lifeCycleObserver is not working with express composition

Created on 4 Oct 2019  路  6Comments  路  Source: strongloop/loopback-next

  1. Have an lb4 app with a lifeCycleObserver.
  2. Convert this app into an express app using express composition.
  3. The lifeCycleObserver does not run.

Current Behavior

Is not running after converted into an express app.

Expected Behavior

lifeCycleObserver running.

Link to reproduction sandbox

Additional information

Related Issues

_See Reporting Issues for more tips on writing good issues_

bug

All 6 comments

You need to call the following:

await lb4app.boot();
await lb4app.start()

if you have multiple express apps , you will receive an exception because the port is already in use

Yes. I鈥檓 working on a fix to disable Http listening for lb4 app.

Do you have an approximate time for that release?

The quick workaround is to have lb4 app listening a different port with host 127.0.0.1.

Was this page helpful?
0 / 5 - 0 ratings