No Description

database.js 393B

    const Sequelize = require('sequelize'); const sequelize = new Sequelize('postgres://postgres:postgres-pi@localhost:5432/home_automation'); module.exports = function(){ sequelize .authenticate() .then(() => { console.log('Connection has been established successfully.'); }) .catch(err => { console.error('Unable to connect to the database:', err); }); }