Skip to content

Tag: javascript

Capture word after first dot and before second dot

i have some strings like: I’m trying to write a regex that makes the first two string pass, but not the third one. The rule is that if the string contains the word “router” after the first dot and before the second dot it’s ok. i tried with but it match every .router. in my string, so …

Webpack dev server and WebSockets

Three quick questions: 1) Knowing full well the benefits of Socket.io, I still wanna know if it is possible to run a single webpack-dev-server that can server both http and ws. Everything online is oriented to using Socket.io and running dual servers for http / ws. 2) If indeed I must use Socket.io, how does …

Getting a PeerServer key

The PeerJS Documentation says The ‘key’ we’re passing in to the Peer constructor is a PeerServer cloud API key. You can use ours for now, but you should sign up for your own free key. However, the given link just leads to this page, which doesn’t have instructions on how to get a PeerS…

How to pass a unique uuid to each callback?

I’m using multer-s3-transform, which allows me to manipulate the image coming in, before uploading it to my bucket. Here’s what I have: The problem is that the uuid will always be different for the small and the original versions. How can I make const fileName = uuid.v4() passed down to each callb…