I want to know if it is possible to run both graphql-yoga and expressjs server on the same port at the same time. thanks
As graphql-yoga is using expressjs under the hood it is already using an expressjs server on the same port at the same time.
const graphqlserver = new GraphQLServer({
//config
});
graphqlserver.express.use(
//express middleware
)
graphqlserver.express.use("/assets", express.static("assets"));
An independent expressjs server on the same port is not possible unless you consider being able to access the server on the same port with a reverse proxy like https://traefik.io/ a possible solution.
Due to inactivity of this issue we have marked it stale. It will be closed if no further activity occurs.
Hey :wave:, It seems like this issue has been inactive for some time. In need for maintaining clear overview of the issues concerning the latest version of graphql-yoga we'll close it.
Feel free to reopen it at any time if you believe we should futher discuss its content. :slightly_smiling_face:
Most helpful comment
As graphql-yoga is using expressjs under the hood it is already using an expressjs server on the same port at the same time.
An independent expressjs server on the same port is not possible unless you consider being able to access the server on the same port with a reverse proxy like https://traefik.io/ a possible solution.