75 lines
2.9 KiB
Plaintext
75 lines
2.9 KiB
Plaintext
# =====================================================
|
|
# BLOG EDITOR BACKEND - ENVIRONMENT CONFIGURATION
|
|
# =====================================================
|
|
# Copy this file to .env and update with your actual values
|
|
# DO NOT commit .env file to git (it's in .gitignore)
|
|
# =====================================================
|
|
|
|
# =====================================================
|
|
# SERVER CONFIGURATION
|
|
# =====================================================
|
|
PORT=5001
|
|
NODE_ENV=development
|
|
|
|
# =====================================================
|
|
# DATABASE CONFIGURATION (PostgreSQL)
|
|
# =====================================================
|
|
# Option 1: Use Supabase connection string (recommended)
|
|
# Format: postgresql://user:password@host:port/database
|
|
DATABASE_URL=postgresql://postgres.ekqfmpvebntssdgwtioj:[YOUR-PASSWORD]@aws-1-ap-south-1.pooler.supabase.com:5432/postgres
|
|
|
|
# Option 2: Use individual parameters (for local development)
|
|
# Uncomment and use these if not using DATABASE_URL
|
|
# DB_HOST=localhost
|
|
# DB_PORT=5432
|
|
# DB_NAME=blog_editor
|
|
# DB_USER=postgres
|
|
# DB_PASSWORD=your_database_password_here
|
|
|
|
# =====================================================
|
|
# AUTH SERVICE INTEGRATION
|
|
# =====================================================
|
|
# URL of your existing auth service
|
|
# The blog editor validates JWT tokens via this service
|
|
AUTH_SERVICE_URL=http://localhost:3000
|
|
|
|
# =====================================================
|
|
# AWS S3 CONFIGURATION (for image uploads)
|
|
# =====================================================
|
|
AWS_REGION=us-east-1
|
|
AWS_ACCESS_KEY_ID=your_aws_access_key_here
|
|
AWS_SECRET_ACCESS_KEY=your_aws_secret_key_here
|
|
# Use either S3_BUCKET_NAME or AWS_BUCKET_NAME (both work)
|
|
S3_BUCKET_NAME=blog-editor-images
|
|
# AWS_BUCKET_NAME=blog-editor-images # Alternative (matches api-v1 pattern)
|
|
|
|
# =====================================================
|
|
# CORS CONFIGURATION
|
|
# =====================================================
|
|
# Frontend URL that will make requests to this backend
|
|
CORS_ORIGIN=http://localhost:4000
|
|
|
|
# Production example:
|
|
# CORS_ORIGIN=https://your-frontend-domain.com
|
|
|
|
# =====================================================
|
|
# NOTES
|
|
# =====================================================
|
|
# 1. DATABASE_URL (Supabase):
|
|
# - Replace [YOUR-PASSWORD] with your actual Supabase password
|
|
# - Supabase connection string includes SSL automatically
|
|
# - Make sure to create the 'blog_editor' database in Supabase
|
|
# OR use the default 'postgres' database and update connection string
|
|
#
|
|
# 2. Run migrations to create tables:
|
|
# npm run migrate
|
|
#
|
|
# 3. Ensure your auth service is running on the port specified in AUTH_SERVICE_URL
|
|
# Note: Auth service uses its own separate database
|
|
#
|
|
# 4. For AWS S3:
|
|
# - Create an S3 bucket
|
|
# - Configure CORS on the bucket to allow PUT requests from your frontend
|
|
# - Create an IAM user with s3:PutObject and s3:GetObject permissions
|
|
# - Use the IAM user's access key and secret key above
|