Skip to content

feat: configure UI host and port from config file - #34

Open
joan-code6 wants to merge 1 commit into
mainfrom
codex/config-file-host-port-ui
Open

joan-code6 wants to merge 1 commit into
mainfrom
codex/config-file-host-port-ui

Conversation

@joan-code6

Copy link
Copy Markdown
Owner

Summary

  • add a versioned config.json for the UI host, port, and default API URL
  • use the configuration for Vite development, preview, and proxy settings
  • remove the VITE_API_URL environment-based configuration

Verification

  • tsc --noEmit -p tsconfig.json
  • tsc --noEmit -p tsconfig.node.json
  • git diff --check

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@appwrite

appwrite Bot commented Aug 27, 2026

Copy link
Copy Markdown

Lanis

Project ID: 698337a60017b46df380

Sites (1)
Site Status Logs Preview QR
 lanis_ui
6a180889003c768d3660
Ready Ready View Logs Preview URL QR Code

Tip

Sites support three domain rule types: Active deployment, Git branch, and Redirect

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a6762f0-9c16-4aa3-8c3d-5fc2774d49d9


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 221b36496b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

export const DEFAULT_API_BASE_URL = (
import.meta.env.VITE_API_URL || 'http://localhost:8000'
).replace(/\/+$/, '');
export const DEFAULT_API_BASE_URL = uiConfig.apiUrl.replace(/\/+$/, '');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Load apiUrl at runtime rather than bundling it

When a prebuilt dist is started with vite preview, changing config.json as README.md instructs updates the preview host and port but not the browser's API address: importing the JSON here causes Vite to inline apiUrl during vite build. This is especially problematic for a single artifact deployed to multiple environments, because every client continues using the build-time URL—by default its own localhost:8000—until the application is rebuilt. Either expose the configuration as a runtime-loaded public file or document and enforce that apiUrl must be set before building.

Useful? React with 👍 / 👎.

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.

1 participant