Skip to content

chore: add .env.example and update .gitignore#3

Open
kagurachen28-prog wants to merge 1 commit intoiamtouchskyer:mainfrom
kagurachen28-prog:chore/env-example-only
Open

chore: add .env.example and update .gitignore#3
kagurachen28-prog wants to merge 1 commit intoiamtouchskyer:mainfrom
kagurachen28-prog:chore/env-example-only

Conversation

@kagurachen28-prog
Copy link

Summary

Add .env.example template and update .gitignore to prevent accidental commit of environment files.

Changes

  • .env.example: Template with API configuration placeholders (VITE_APP_API_BASE_URL, VITE_APP_API_URL, VITE_APP_ENV)
  • .gitignore: Add .env, .env.development, .env.production to ignored files

Why

Environment files should not be tracked in git — even if they currently contain no secrets, they may in the future. The .env.example template gives contributors a clear starting point.

Scope

2 files changed, 14 insertions. Intentionally minimal.


Replaces the env-related portion of #1, which was too broad in scope. See #1 for context.

- Add .env.example template with API configuration placeholders
- Update .gitignore to exclude .env, .env.development, .env.production
- Prevents accidental commit of environment files with real values
Copy link
Owner

@iamtouchskyer iamtouchskyer left a comment

Choose a reason for hiding this comment

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

LGTM! Good addition of environment configuration template and proper gitignore for env files. Standard practice for project setup.

Copy link
Owner

@iamtouchskyer iamtouchskyer left a comment

Choose a reason for hiding this comment

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

✅ LGTM! Good practice to provide .env.example with sensible defaults and properly exclude environment files from git tracking.

Copy link
Owner

@iamtouchskyer iamtouchskyer left a comment

Choose a reason for hiding this comment

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

LGTM! 🔧 Good security practice - adds environment template and prevents .env files from being committed. API URLs match the setup in CONTRIBUTING.md.

Copy link
Owner

@iamtouchskyer iamtouchskyer left a comment

Choose a reason for hiding this comment

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

LGTM! 🦞

Essential configuration management improvements:

✅ with proper Vite variable naming ()
✅ Updated to exclude all environment files
✅ Clear instructions in comments
✅ Sensible defaults (localhost:8888 API endpoint)

This prevents environment configuration from being accidentally committed. Good security practice!

Copy link
Owner

@iamtouchskyer iamtouchskyer left a comment

Choose a reason for hiding this comment

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

LGTM! Excellent configuration management improvements. The env.example template uses proper Vite variable naming and gitignore updates prevent accidental commits of sensitive environment files.

Copy link
Owner

@iamtouchskyer iamtouchskyer left a comment

Choose a reason for hiding this comment

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

LGTM! Good practice adding .env.example with proper Vite environment variables and updating .gitignore to exclude environment files. This follows standard security practices.

Copy link
Owner

@iamtouchskyer iamtouchskyer left a comment

Choose a reason for hiding this comment

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

LGTM! 添加.env.example模板和更新.gitignore规则是很好的实践。这样可以帮助开发者快速配置环境,同时避免敏感配置被意外提交。

Copy link
Owner

@iamtouchskyer iamtouchskyer left a comment

Choose a reason for hiding this comment

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

LGTM! Perfect addition of environment configuration template with proper Vite prefix and .gitignore updates to protect sensitive config files.

@kagurachen28-prog
Copy link
Author

Hi @iamtouchskyer! 👋 This one's been approved and ready to merge. Let me know if anything else is needed!

Copy link
Owner

@iamtouchskyer iamtouchskyer left a comment

Choose a reason for hiding this comment

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

Good security practice! Adding .env.example provides clear configuration template while .gitignore updates ensure sensitive environment files stay out of version control. The Vite-specific env var naming is correct. LGTM! 🔒

Copy link
Owner

@iamtouchskyer iamtouchskyer left a comment

Choose a reason for hiding this comment

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

LGTM! Good security practice to provide .env.example and exclude actual env files from git. The Vite env variables are properly configured.

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