Skip to content
Snippets Groups Projects
Commit cf67fd9b authored by ems19's avatar ems19
Browse files

[ADD] New Postgres connection

parent 850159d2
No related branches found
No related tags found
4 merge requests!379homologa -> master,!378dev -> homologa,!375Prd migration,!374Prd migration
const Sequelize = require('sequelize');
const DATABASE_URL = 'postgres://postgres:postgres@localhost:5432/postgres'
const dbConfig = {
database: 'simcaq_adm',
username: 'simcaq',
password: 'simcaq',
host: '200.17.202.97',
port: 5432,
dialect: 'postgres',
};
const db = new Sequelize(DATABASE_URL)
const db = new Sequelize(dbConfig)
db.authenticate()
.then(() => {
console.log('Connection has been established successfully.');
})
.catch((err) => {
console.error('Unable to connect to the database:', err);
});
module.exports = db
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment