reactql / kit

ReactQL starter kit (use the CLI)
https://reactql.org
229 stars 38 forks source link

Set graphql endpoint with env variable #151

Closed tsdexter closed 6 years ago

tsdexter commented 6 years ago

How can I set the graphql endpoint from an env variable so I don’t have to build several versions to run the codebase with several backends:

For example, I’d like to be able to run

ENDPOINT=endpoint1 PORT=4001 node dist/server.js
ENDPOINT=endpoint2 PORT=4002 node dist/server.js

So I can run two instances with different graphql servers without having to build two different dist’s

Is a setup like this possible?

leebenson commented 6 years ago

Apologies for the generic response, but I've released a new v3.0 kit, which has been re-written from the ground up.

It bumps the ReactQL stack to Webpack 4, React 16.4, Apollo Client 2.0, and adds Styled Components, full SSR (even in development), and has been re-written in Typescript. It's leaner, faster and has been brought completely up-to-date.

If you're still using ReactQL (and I appreciate you may not be, given the time lag in my response), I'd recommend checking out the new kit to see if your issue has been answered. If not, please feel free to post a new issue at https://github.com/leebenson/reactql