D
D
Dimash Kenzhegaliev2021-06-09 07:39:13
Nginx
Dimash Kenzhegaliev, 2021-06-09 07:39:13

How to configure nginx to use websocket ws library?

please help,
I uploaded the back part written on the node to the server, everything is fine,
but I didn’t think about the websocket connection at all,
I have no idea how to configure nginx for it,
the only thing is that I want ws to be available in the end same domain just not http:// and ws://
is it possible? if not, then please explain how to do it,
as I understand it, you need to use the https-proxy-agent library, using the example of using it, there is only a specific code,
but how you need to configure nginx for it is not written

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2021-06-09
@ky0

Everything you want is part of the standard nginx functionality - https://nginx.org/en/docs/http/websocket.html .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question