feat: allow overriding checkly base url [kit-00]#1181
feat: allow overriding checkly base url [kit-00]#1181miliberlin wants to merge 3 commits intomainfrom
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.
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.
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.
I guess this works but how about the getMqttUrl below?
There was a problem hiding this comment.
@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