Skip to content

Instantly share code, notes, and snippets.

@conanak99
Created December 11, 2020 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save conanak99/9aa71212270eca37521e798a9092ea24 to your computer and use it in GitHub Desktop.
Save conanak99/9aa71212270eca37521e798a9092ea24 to your computer and use it in GitHub Desktop.
// Đọc DB_CONNECTION từ biến môi trường hoặc file Config
const DB_CONNECTION = Config.Get('DB_CONNECTION') || env['DB_CONNECTION']
const DB_CONNECTION_POLL = 4 // Dùng 4 vì lý do blah blah
const DB_NAME = 'db_codedao_blog' // Tách thành biên để biết đây là tên DB
DB.connect(DB_CONNECTION, DB_NAME, DB_CONNECTION_POLL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment