Skip to main content

Basic Configuration

After installation, you can customize the system via the configuration file.

Configuration Options

General Settings

OptionDefaultDescription
APP_NAMEMyAppApplication display name
APP_URLhttp://localhost:3000Base URL
APP_TIMEZONEAsia/Ho_Chi_MinhSystem timezone
APP_LOCALEviDefault language
DEBUG_MODEfalseEnable debug mode (dev only)

Database Settings

OptionDescription
DB_HOSTDatabase server address
DB_PORTConnection port (default: 5432)
DB_NAMEDatabase name
DB_USERUsername
DB_PASSPassword

Email Settings

OptionDescription
MAIL_HOSTSMTP server
MAIL_PORTSMTP port (587 or 465)
MAIL_USEREmail account
MAIL_PASSEmail password
MAIL_FROMDefault 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.