hapi-sequelizejs is a hapi.js plugin (v4.6.1) that integrates the Sequelize ORM (versions 5.x or 6.x) as a server plugin, supporting multiple database connections. It decorates the request object with a getDb method and automatically loads model associations. Compatible with hapi.js 19.x, 20.x, and @hapi/hapi 21.x. Development appears to be in maintenance mode with infrequent updates; no known active development since 2021. Key differentiator is its tight integration with hapi's plugin system, allowing multiple database instances and automatic model syncing.
npm install hapi-sequelizejsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Registers hapi-sequelizejs with a Sequelize instance, syncs models, and uses getDb in a route handler.
Upgrade to @hapi/hapi 19.x or 20.x.
Ensure the name passed to getDb matches the name property in the options array.
Use module.exports = function(sequelize, DataTypes) { return sequelize.define(...); };Consider alternatives like @hapipal/schwifty or manual integration.
Check that the 'name' in options array matches the argument to getDb. Also ensure options is an array even for single database.
Make sure options[0].sequelize is a valid Sequelize instance (new Sequelize(...)).
Wrap model definition in module.exports = function(sequelize, DataTypes) { return sequelize.define(...); };