The GrowthBook config has been written at ~/.growthbook/config.toml
But running the line to generate types returns an Unauthorised error:
There was an error fetching the featuresError: Cannot fetch: Unauthorized
Did anyone experience the same?
f
future-teacher-7046
03/29/2023, 1:22 AM
Hi Boris. Are you self-hosting or using GrowthBook Cloud?
b
brash-stone-46387
03/29/2023, 1:24 AM
Self hosting
brash-stone-46387
03/29/2023, 1:26 AM
Is there a way to point it to the instance?
f
future-teacher-7046
03/29/2023, 1:26 AM
Yeah, when you generate features, we use GrowthBook Cloud by default. You can override the host with the
--apiBaseUrl
flag. For example:
Copy code
growthbook features generate-types --apiBaseUrl <http://localhost:3100> --output ./types
future-teacher-7046
03/29/2023, 1:27 AM
Looking at this now, we should really move the API Base URL into the login command. No reason to make you enter it every time. I'll add an issue in GitHub for this