feat: add listen hook in node-server preset #270
Replies: 1 comment
-
Hi @lewebsimple The The server used by nitro in development is served with a unix socket (on unix) or on another sub port (your dev server doesn't restart when reloading, whereas this will) (see here) Also note that in the I've made a simple POC to listen to websockets on nuxt 3 here: https://github.com/stafyniaksacha/nuxt-poc-websockets |
Beta Was this translation helpful? Give feedback.
-
In the context of Nuxt 3, it's easy to access the server instance using the
listen
hook in development, but in production it's quite hard (and it seems overkill) to override the nitropacknode-preset
just to hook stuff to the http server instance like WebSocket.Is there any issue with exposing this hook ?
Beta Was this translation helpful? Give feedback.
All reactions