Replies: 1 comment
-
Importing constants from package worked for me, e.g.:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is wrong with this? I use normal code and I just changed for nothing except SSLApp to App. it wor wll if I remove compressor option It work well. I used example code
code:
/* Non-SSL is simply App() /
require('uWebSockets.js').App().ws('/', {
/* There are many common helper features */
idleTimeout: 30,
maxBackpressure: 1024,
maxPayloadLength: 512,
compression: DEDICATED_COMPRESSOR_3KB,
/* For brevity we skip the other events (upgrade, open, ping, pong, close) /
message: (ws, message, isBinary) => {
/ You can do app.publish('sensors/home/temperature', '22C') kind of pub/sub as well */
}
}).get('/*', (res, req) => {
/* It does Http as well */
res.writeStatus('200 OK').writeHeader('IsExample', 'Yes').end('Hello there!');
}).listen(9001, (listenSocket) => {
if (listenSocket) {
console.log('Listening to port 9001');
}
});
I used this on node 14.17.6
and it on window 10 1803
Beta Was this translation helpful? Give feedback.
All reactions