Skip to content

Conversation

@amliu-jumptrading
Copy link
Collaborator

fix: support websocket url configuration

I have added support for configuring the WebSocket URL to simplify swapping it during development. After considering two approaches — using an .env file or a configuration file — I chose to use the .env file for the following reasons:

It suits our needs for storing simple key-value pairs.
The WebSocket URLs are runtime-specific and should not be committed to source control.
While configuration files are better suited for structured data (e.g., JSON) or scenarios where settings need to be committed, the .env file approach was a better fit for our use case.

Additionally, I’ve specified in the README.md for developers to create a .env.local file. This is useful because .env.local is ignored by npm build in most frameworks that use environment files (including Vite). It allows developers to define local overrides without affecting production builds or committing sensitive information.

@asuzuki-jumptrading asuzuki-jumptrading merged commit b525820 into main Apr 11, 2025
2 checks passed
@asuzuki-jumptrading asuzuki-jumptrading deleted the amliu/websocket-url branch April 11, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants