Created
May 26, 2017 00:11
-
-
Save vitorhidalgo/b3dd54a289967f630bafc8a83b8cc71a to your computer and use it in GitHub Desktop.
config/database.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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