first commit
This commit is contained in:
24
config/dbConfig.js
Normal file
24
config/dbConfig.js
Normal file
@ -0,0 +1,24 @@
|
||||
// dbConfig.js
|
||||
const mysql = require('mysql');
|
||||
|
||||
const connection = mysql.createConnection({
|
||||
host: 'localhost',
|
||||
user: 'root',
|
||||
password: '',
|
||||
database: 'community_rule',
|
||||
});
|
||||
// const mysql = require('mysql2');
|
||||
|
||||
// const connection = mysql.createConnection({
|
||||
// host: 'localhost',
|
||||
// user: 'root',
|
||||
// password: 'your_mysql_password',
|
||||
// database: 'your_database_name',
|
||||
// });
|
||||
|
||||
connection.connect((err) => {
|
||||
if (err) throw err;
|
||||
console.log('Connected to the database');
|
||||
});
|
||||
|
||||
module.exports = connection;
|
Reference in New Issue
Block a user