Guest User

Untitled

a guest
Apr 23rd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. const Sequelize = require('sequelize');
  2. const sequelize = new Sequelize('database', 'root', 'passwd', {
  3. host: 'localhost',
  4. dialect: 'mysql',
  5.  
  6. // http://docs.sequelizejs.com/manual/tutorial/querying.html#operators
  7. operatorsAliases: false
  8. });
  9. sequelize
  10. .authenticate()
  11. .then(() => {
  12. console.log('Connection has been established successfully.');
  13. })
  14. .catch(err => {
  15. console.error('Unable to connect to the database:', err);
  16. });
Add Comment
Please, Sign In to add comment