Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vitorhidalgo/b3dd54a289967f630bafc8a83b8cc71a to your computer and use it in GitHub Desktop.
Save vitorhidalgo/b3dd54a289967f630bafc8a83b8cc71a to your computer and use it in GitHub Desktop.
config/database.js
var sequelize = require('sequelize');
var mysql = require('mysql');
module.exports = function( p_url )
{
sequelize = new sequelize(p_url);
sequelize.authenticate()
.then(function(){
console.log('Connection has been established successfully.');
})
.catch(function(err){
console.log('Unable to connect to the database: ', err);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment