Apollo Server + WS Server

rehatkathuria
HOBBY

a year ago

I have a project that has an Apollo GraphQL server as well as a Websocket server from Bun. Am I able to run both in the same instance? I'm currently having trouble with the ports.

ws.server = Bun.serve({
...

makes use of the PORT environment variable provided by the runtime but so does the Apollo GraphQL server.

Is there a way for me to specify different ports assigned from Railway? Is that good practice or should they be separate services?

0 Replies

rehatkathuria
HOBBY

a year ago

27104ba8-185a-4552-bd62-7b52026194df