Configuration
This guide covers the configuration setup for the 2KRIKA backend service.
Database Configuration
SQL Database (PostgreSQL/SQLite)
The application uses Sequelize ORM for SQL database operations.
Using SQLite (Development)
For local development, SQLite is the quickest option:
Using PostgreSQL (Production)
For production or staging environments:
MongoDB
MongoDB is used for storing chat messages if you choose mongo as message backend:
Redis
Redis is used for caching:
Configuration Files
Environment Variables File
Create a .env file in the project root or use the ENV file approach:
# Create ENV file
touch ENV
# Add your environment variables (see Environment Variables section)
nano ENV
Load the environment variables:
Sequelize Configuration
The Sequelize configuration is located at:
This file is specific to your environment and should not be committed to version control (already in .gitignore).
Storage Configuration
Configure the storage directory for file uploads:
Make sure this directory exists and has proper write permissions.
CORS Configuration
Configure allowed origins for CORS:
Next Steps
- Environment Variables - Complete list of environment variables
- Running the App - Start the development server