【文件属性】:
文件名称:node-hapi-sequelize:用于HAPI v6或7的插件,可使用Sequelize连接到数据库
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-14 15:33:05
JavaScript
hapse-sequelize
这是 v9的插件,可使用 v3连接到数据库。
安装
您可以使用npm将模块添加到HAPI项目中:
$ npm install hapi-sequelize --save
将插件添加到您的项目中
创建server对象后,在服务器初始化文件中添加以下代码(提供的选项是插件默认值):
server.register({
register: require('hapi-sequelize'),
options: {
associationFile: 'associations.js',
database: 'myDatabase',
username: null,
password: null,
host: 'localhost',
port: 33
【文件预览】:
node-hapi-sequelize-master
----LICENSE(1KB)
----README.md(3KB)
----.gitignore(587B)
----index.js(4KB)
----package.json(578B)