Connecting to a database Redis #1136
-
uWebSockets.js appears to be closed
For example: You need to interact with front-end customers,I want to operate Redis,You are happy to introduce
Try to connect
Now try uWebSocket show is the effect
The right approachDon't use require, because you can only use it now. When you cooperate with other libraries, you will lose the Promise and fall into an infinite loop in res.onAbortd res.cork
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Your example doesn't work because you're neither responding nor attaching an onAborted handler, so the process will terminate like so:
Instead of writing from gut feeling and then complaining about it not working, you can take an existing example and simply add your Redis call. |
Beta Was this translation helpful? Give feedback.
Your example doesn't work because you're neither responding nor attaching an onAborted handler, so the process will terminate like so:
Instead of writing from gut feeling and then complaining about it not working, you can take an existing example and simply add your Redis call.