1.4 KiB
1.4 KiB
Environment Variables Template
Copy this to .env in the backend directory and fill in your values.
# Server Configuration
PORT=3001
NODE_ENV=development
# Database Configuration
DATABASE_URL=postgresql://user:password@localhost:5432/koin_ping
# Ethereum JSON-RPC Endpoint
# Examples:
# - Infura: https://mainnet.infura.io/v3/YOUR-PROJECT-ID
# - Alchemy: https://eth-mainnet.g.alchemy.com/v2/YOUR-API-KEY
# - Local node: http://localhost:8545
ETH_RPC_URL=https://mainnet.infura.io/v3/YOUR-PROJECT-ID
# Polling interval in milliseconds
# Default: 60000 (1 minute)
POLL_INTERVAL_MS=60000
# Firebase Configuration (for authentication)
# Get this from Firebase Console > Project Settings > Project ID
FIREBASE_PROJECT_ID=koin-ping
Quick Setup
cd backend
cp ENV_TEMPLATE.md .env
# Edit .env with your actual values
Firebase Setup
For Firebase Admin SDK to work, you need to set up Application Default Credentials:
Option 1: Use Firebase Project ID (easiest for development)
- Just set
FIREBASE_PROJECT_IDin .env - Firebase Admin will use Application Default Credentials
Option 2: Use Service Account Key (production)
- Go to Firebase Console > Project Settings > Service Accounts
- Click "Generate new private key"
- Download the JSON file
- Either:
- Set
GOOGLE_APPLICATION_CREDENTIALS=/path/to/serviceAccountKey.jsonin .env - Or keep it in backend/ and add to .gitignore
- Set