فهرست منبع

chore: add .env.example files and update .gitignore to prevent secret commits

Adam Jafarov 6 ساعت پیش
والد
کامیت
ced2baa42f
3فایلهای تغییر یافته به همراه36 افزوده شده و 0 حذف شده
  1. 9 0
      .gitignore
  2. 4 0
      backend/.env.example
  3. 23 0
      backend/.env.production.example

+ 9 - 0
.gitignore

@@ -26,3 +26,12 @@ dist-ssr
 *.sw?
 public/posts/*
 public/posts/index.json
+
+# Environment variables - never commit these!
+.env
+.env.local
+.env.production
+.env.*.local
+backend/.env
+backend/.env.production
+backend/.env.local

+ 4 - 0
backend/.env.example

@@ -0,0 +1,4 @@
+# Local Development Environment Variables
+# Copy this file to .env and fill in your actual values
+
+GEMINI_API_KEY=your_gemini_api_key_here

+ 23 - 0
backend/.env.production.example

@@ -0,0 +1,23 @@
+# Production Environment Variables
+# Copy this file to .env.production and fill in your actual values
+
+# Server Configuration
+NODE_ENV=production
+PORT=3001
+
+# Session Configuration - CHANGE THIS SECRET IN PRODUCTION!
+SESSION_SECRET=generate_a_secure_random_string_here
+
+# CORS Configuration - Update with your actual domain
+FRONTEND_URL=https://your-domain.com
+
+# Database/Storage paths (relative to backend directory)
+POSTS_DIR=../public/posts
+THEMES_FILE=./themes.json
+
+# AI Configuration
+GEMINI_API_KEY=your_gemini_api_key_here
+
+# Security Settings
+COOKIE_SECURE=true
+COOKIE_SAME_SITE=strict