Environment Variables Configuration
Before running Basemulti, you need to configure the following environment variables:
Environment Variable | Description | Required |
---|---|---|
BASEMULTI_KEY | Key for authentication | Yes |
NEXT_PUBLIC_URL | Base URL of the Basemulti instance | Yes |
DB_DRIVER | Database driver type (e.g., sqlite, mysql, postgresql) | Yes |
DB_DATABASE | SQLite database file path | Required for SQLite only |
DB_HOST | Database host address | Required for MySQL/PostgreSQL only |
DB_PORT | Database port | Required for MySQL/PostgreSQL only |
DB_USER | Database username | Required for MySQL/PostgreSQL only |
DB_PASSWORD | Database password | Required for MySQL/PostgreSQL only |
DB_DATABASE | Database name | Required for MySQL/PostgreSQL only |
NEXT_PUBLIC_DISABLE_PROVIDERS | Disable service providers, e.g., sqlite,mysql (optional) | No |
You can set these environment variables by creating a .env
file. For example:
bash
BASEMULTI_KEY=your-secret-key
NEXT_PUBLIC_URL=http://localhost:3000
DB_DRIVER=sqlite
DB_DATABASE=./data/database.sqlite
Or for MySQL:
bash
BASEMULTI_KEY=your-secret-key
NEXT_PUBLIC_URL=http://localhost:3000
DB_DRIVER=mysql
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=password
DB_DATABASE=basemulti