Skip to content

If I want to use websocket in my project, whether there need two gateways? #1190

Answered by icebob
liaodalin19903 asked this question in Q&A
Discussion options

You must be logged in to vote

First of all, the moleculer-io is the official Socket.io library.

You can use the moleculer-web HTTP server as the server of the moleculer-io as well, so no need to start two HTTP server.
More info: https://github.com/moleculerjs/moleculer-io#init-server
Or real example: https://github.com/icebob/kantab/blob/master/backend/services/api.service.js

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by liaodalin19903
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants