Basic Configuration
After installation, you can customize the system via the configuration file.
Configuration Options
General Settings
| Option | Default | Description |
|---|---|---|
APP_NAME | MyApp | Application display name |
APP_URL | http://localhost:3000 | Base URL |
APP_TIMEZONE | Asia/Ho_Chi_Minh | System timezone |
APP_LOCALE | vi | Default language |
DEBUG_MODE | false | Enable debug mode (dev only) |
Database Settings
| Option | Description |
|---|---|
DB_HOST | Database server address |
DB_PORT | Connection port (default: 5432) |
DB_NAME | Database name |
DB_USER | Username |
DB_PASS | Password |
Email Settings
| Option | Description |
|---|---|
MAIL_HOST | SMTP server |
MAIL_PORT | SMTP port (587 or 465) |
MAIL_USER | Email account |
MAIL_PASS | Email password |
MAIL_FROM | Default sender address |
Applying Configuration
After editing the configuration file, restart the service:
npm restart
# or
systemctl restart myapp
tip
Always back up your .env file before making changes in a production environment.
Security
Never commit your .env file to a git repository. Add .env to .gitignore.