arefm / fastify-sequelizejs

Sequelize.js adapter for Fastify
Other
4 stars 0 forks source link

fastify.Sequelize undefined! #1

Open wuchuguang opened 6 years ago

wuchuguang commented 6 years ago

const fastify = require('fastify')(); fastify.register(Client, { host: xxxx', dialect:'mysql', username: 'root', password: 'kgd1988', database: 'site515345' }); console.log(fastify.Sequelize);

johngerome commented 4 years ago

Probably sequalize still not finish loading. Try

fastify.ready(err => {
   console.log(fastify.Sequelize);
})