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
-
In my requirement, I will use both normal HTTP request and websocket request in my project, such as, moleculer-web + moleculer-socketio ? like below: |
Beta Was this translation helpful? Give feedback.
Answered by
icebob
Mar 8, 2023
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
liaodalin19903
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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