Skip to content

Conversation

@gregberns
Copy link

@gregberns gregberns commented Nov 7, 2025

Took a bit to figure out what the env var name was for the API. Hopefully makes it easier for others to get started.

(BTW - this project is awesome. Thx for putting it together.)

Summary by CodeRabbit

  • Chores
    • Added environment configuration example file for development setup.

@coderabbitai
Copy link

coderabbitai bot commented Nov 7, 2025

Walkthrough

Added a new environment example file .env.example containing a single variable VITE_API_BASE_URL set to http://localhost:4096.

Changes

Cohort / File(s) Summary
Environment Configuration
\.env\.example
Added new environment example file with VITE_API_BASE_URL set to http://localhost:4096

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Confirm the literal URL http://localhost:4096 is the intended default (no placeholder required).
  • Check project conventions for environment example formatting (escaping, comments).

Poem

🐰 A small .env placed with care,
VITE_API_BASE_URL waits there,
Localhost humming on four-oh-nine,
Developers copy, then all systems fine. 🌱

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: Add example env file' directly and clearly describes the main change: adding an example environment configuration file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5936263 and 403ed5e.

📒 Files selected for processing (1)
  • .env.example (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .env.example

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example:

"Create a concise high-level summary as a bullet-point list. Then include a Markdown table showing lines added and removed by each contributing author."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.env.example (1)

1-1: Clarify the placeholder port value for better developer experience.

The placeholder {{OPEN_CODE_PORT}} uses template syntax that may confuse developers into copying it literally rather than replacing it with an actual port number. Developers typically expect .env.example files to use either literal values or comments explaining what to substitute.

Consider one of these approaches:

  1. Use a concrete default port number (most common approach):
-VITE_API_BASE_URL=http://localhost:{{OPEN_CODE_PORT}}
+VITE_API_BASE_URL=http://localhost:3000
  1. Use a clearer placeholder with an explanatory comment:
-VITE_API_BASE_URL=http://localhost:{{OPEN_CODE_PORT}}
+# API base URL - update the port number to match your backend server
+VITE_API_BASE_URL=http://localhost:YOUR_PORT

Choose the approach that aligns with how your backend is typically configured and documented.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0ab3c85 and 5936263.

📒 Files selected for processing (1)
  • .env.example (1 hunks)

@ppb31
Copy link

ppb31 commented Nov 17, 2025

Merci pour cette contribution utile ! 👍

J'ai identifié un petit problème avec le placeholder {{OPEN_CODE_PORT}} :

Problème:

  • La syntaxe {{}} n'est pas supportée par Vite
  • Les utilisateurs ne sauront pas quelle valeur utiliser
  • Le fichier ne fonctionnera pas directement après copie

Suggestion:
Remplacer par la valeur par défaut du port (4096) avec de la documentation :

# Configuration de l'API OpenCode
# URL de base pour le serveur OpenCode
# Par défaut, le serveur écoute sur le port 4096
VITE_API_BASE_URL=http://localhost:4096

# Pour un serveur distant, utilisez :
# VITE_API_BASE_URL=http://votre-serveur:4096

# Pour la production :
# VITE_API_BASE_URL=https://api.votre-domaine.com

Avantages:

  • Les utilisateurs peuvent simplement copier le fichier (cp .env.example .env)
  • La configuration fonctionne immédiatement avec les valeurs par défaut
  • La documentation inline aide à comprendre les options disponibles

Qu'en pensez-vous ?

@gregberns
Copy link
Author

Fantastic idea! Port updated.

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