first commit

This commit is contained in:
Rohit Taware
2023-12-16 11:32:27 -07:00
commit beb65349b6
9 changed files with 1814 additions and 0 deletions

24
config/dbConfig.js Normal file
View 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;