Last active
February 7, 2021 15:00
-
-
Save bastienapp/ad5bbf20ce9f6b0100986f4bbd04bd89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("dotenv").config(); | |
const mysql = require("mysql"); | |
const config = { | |
host: process.env.DB_HOST, | |
port: process.env.DB_PORT, | |
user: process.env.DB_USER, | |
password: process.env.DB_PASSWORD, | |
database: process.env.DB_NAME, | |
timezone: 'Europe/Paris' | |
}; | |
const connection = mysql.createPool(config); | |
module.exports = connection; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment