Salitha
Salitha

Reputation: 1147

Implement multiple REST servers on same Loopback 4 app

Can we create multiple REST servers in single loopback app?

My requirement is running two REST servers (say 8080 and 8081 on localhost) but to have same app. My implementation will be, receiving some data from 8080, process them and return some results on 8081.

The absolute reason for above requirement is the lack of Socket.io integration for loopback 4. Any solutions are welcome.

Upvotes: 0

Views: 533

Answers (1)

Rifa Achrinza
Rifa Achrinza

Reputation: 1585

lack of Socket.io integration for LoopBack 4

While LoopBack 4 does not provide first-class Socket.io integration yet, there is an example provided by a core maintainer of the project.

Can we create multiple REST servers in single loopback app?

Yes. Additional servers can be added with app.server() or bulk-added with app.servers().

Further reading:

Upvotes: 1

Related Questions