worried-planet-2191
12/19/2023, 12:01 AMrhythmic-morning-61672
12/19/2023, 9:11 PMGROWTHBOOK_API_HOST should just be <https://cdn.growthbook.io/> .
2. I set the environment variables in my zshrc file.
3. At first I had this as <http://localhost:3300>, but that wasn't working properly. I ended up running an ngrok server pointed to port 3300 and that's able to form a connection.
A few other things to note that the docs don't specify:
• Make sure your SDK connection(s) have the options shown in the image set properly. For the url, I provided my proxy url.
• Use the proxy url in your code for the apiHost property.
The reason I say I kind of got it working is because the SDK connection is complete as seen in my second screenshot, but for some reason, I'm getting false back for all of my feature flags. The problem with the ngrok server though is that it's not letting me view the actual response from the GB API and makes it hard to troubleshoot.
If anyone has ideas, please let me know. I might try setting the proxy up in AWS and see if that gets me any other results.happy-autumn-40938
12/19/2023, 10:44 PM<https://cdn.growthbook.io> (I believe without the trailing slash)
2. .zshrc, which is specific to ZSH, is where you could set a global environment variable across your entire system. If you wanted to set a local variable you'd add a .env.local file to the project root (when running the codebase directly, it's in /packages/apps/proxy/). However, for deployment you'd need to use whatever provisioning mechanism specific to your vendor to set the env variables.
3. I've had mixed luck running with ngrok, but your mileage may vary. For actual deployments however, you probably wouldn't use any sort of tunneling.
4. Yes, you do need to set your proxy location per SDK Connection if you're using GrowthBook Cloud.
5. Correct, point your SDK endpoints at your own proxy. A rare exception would be if you're running hybrid (i.e. features endpoint pointing to your proxy, streaming endpoint pointing to our CDN).rhythmic-morning-61672
12/28/2023, 11:51 PM