You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to run react-router-serve as a socket-activated service. I want this mostly for zero-downtime restarts in small deployments: systemd can keep a socket open (and Linux will handle a small queue of connections waiting to be received).
I believe this can be handled inside react-router-serve, without external dependencies: the core of socket activation protocol implementation is pretty much:
if(env.LISTEN_PID==process.pid){servers=servers.concat(Array.from({length: parseInt(env.LISTEN_FDS)},(v,i)=>i+3)).map(fd=>app.listen({fd},()=>console.log(`Listening on fd ${fd}`);}
I will try to prepare a PR, but I wonder if this kind of feature would be accepted?
Edit: did the PR, let's see what happens ^_^: #13848
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to run react-router-serve as a socket-activated service. I want this mostly for zero-downtime restarts in small deployments: systemd can keep a socket open (and Linux will handle a small queue of connections waiting to be received).
I believe this can be handled inside react-router-serve, without external dependencies: the core of socket activation protocol implementation is pretty much:
I will try to prepare a PR, but I wonder if this kind of feature would be accepted?
Edit: did the PR, let's see what happens ^_^: #13848
Beta Was this translation helpful? Give feedback.
All reactions