-
Notifications
You must be signed in to change notification settings - Fork 19
feat: allow overriding checkly base url [kit-00] #1181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
|
|
||
| getApiUrl (): string { | ||
| // Allow overriding the API URL via CHECKLY_BASE_URL environment variable | ||
| if (process.env.CHECKLY_BASE_URL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty much only needed for local development. Let me know if you prefer moving this to line 87 as local: process.env.CHECKLY_BASE_URL || 'http://127.0.0.1:3000'.
See the PR description for more context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we move it to 87 then the user also needs to add the env for local (so 2 envs) this way we override everything by just setting one env 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this works but how about the getMqttUrl below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sorccu good point! The local MQTT server also needs to be tunneled and the URL overwritten. I haven't worked on this part yet on the FE side. I'll put this PR back into draft until I've tested that fully.
This comment has been minimized.
This comment has been minimized.
|
🎉 Experimental release successfully published on npm |
Affected Components
Notes for the Reviewer
In order to support local development for the GitHub integration project, we need to be able to alter the Checkly base URL.
The GitHub integration flow opens a PR with changes on the user's codebase to add the Checkly CLI and add example GitHub action workflows running the
testanddeploycommands.To test this locally, we expose and access the local backend via a tunnel (ngrok, cloudflare etc.), but the API URL is currently hardcoded to localhost and thus can't be accessed from a GH action.
New Dependency Submission