Graphql-yoga: Is it possible to run graphql-yoga along side expressjs server

Created on 4 Aug 2018  路  3Comments  路  Source: dotansimha/graphql-yoga

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

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.

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.

All 3 comments

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:

Was this page helpful?
0 / 5 - 0 ratings