Skip to content
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

fix: align base url in client if api runs on a different port #2353

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

C0ldSmi1e
Copy link
Contributor

Relates to

Risks

Low

Background

What does this PR do?

Currently, the client depends on the api (server) base url, which is hardcoded in client/src/lib/api.ts:

const BASE_URL = "http://localhost:3000";

If we would like to run the server on another port, we can modify the SERVER_PORT in .env, while we still need to update the BASE_URL in the client/src/lib/api.ts.

This PR will align the server port, so that we only need to update the .env if we need to run the server on a different port.

It also ensures the single source of credential.

What kind of change is this?

Improvements

Documentation changes needed?

My changes do not require a change to the project documentation.

Testing

Where should a reviewer start?

Run the project on a different port, and see if the client works as expected.

Detailed testing steps

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @C0ldSmi1e! Welcome to the elizaOS community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now an elizaOS contributor!

@odilitime odilitime merged commit 30b1c69 into elizaOS:develop Jan 16, 2025
6 checks passed
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.

2 participants