52 lines
1.1 KiB
Markdown
52 lines
1.1 KiB
Markdown
# Configuration Guide
|
|
|
|
Environment configuration for the Wizamart API.
|
|
|
|
## Environment Variables
|
|
|
|
Create a `.env` file in your project root:
|
|
|
|
```env
|
|
# Database Configuration
|
|
DATABASE_URL=sqlite:///./wizamart.db
|
|
# For PostgreSQL: DATABASE_URL=postgresql://user:password@localhost:5432/wizamart
|
|
|
|
# Security
|
|
JWT_SECRET_KEY=your-super-secret-key-change-in-production
|
|
JWT_EXPIRE_HOURS=24
|
|
|
|
# API Settings
|
|
API_HOST=0.0.0.0
|
|
API_PORT=8000
|
|
DEBUG=True
|
|
|
|
# Rate Limiting
|
|
RATE_LIMIT_ENABLED=True
|
|
RATE_LIMIT_REQUESTS=100
|
|
RATE_LIMIT_WINDOW=3600
|
|
```
|
|
|
|
## Configuration Options
|
|
|
|
| Variable | Description | Default | Required |
|
|
|----------|-------------|---------|----------|
|
|
| `DATABASE_URL` | Database connection string | SQLite | Yes |
|
|
| `JWT_SECRET_KEY` | JWT signing key | - | Yes |
|
|
| `DEBUG` | Enable debug mode | False | No |
|
|
|
|
## Environment-Specific Setup
|
|
|
|
### Development
|
|
```env
|
|
DEBUG=True
|
|
DATABASE_URL=sqlite:///./wizamart.db
|
|
```
|
|
|
|
### Production
|
|
```env
|
|
DEBUG=False
|
|
DATABASE_URL=postgresql://user:password@host:5432/db
|
|
JWT_SECRET_KEY=production-secret-key
|
|
```
|
|
|
|
*This guide is under development. See [Installation](installation.md) for complete setup instructions.* |