【文件属性】:
文件名称:hapi-sql:hapi.js 的续集插件
文件大小:7KB
文件格式:ZIP
更新时间:2021-06-23 12:34:13
JavaScript
hapi-sql
一个插件
安装
npm install hapi-sql --save
添加插件
使用
选项
默认值:
{
modelsPath: '/path/to/models',
database: 'dbName',
user: 'uName',
password: 'password',
dialect: 'mysql',
port: 3306,
host: 'localhost',
sync: {
force: false
}
}
此外,您可以传递任何其他续集参数。
用法
如果您要添加模型,请使用模型文件夹中的以下index.js文件。
var fs = require('fs'),
path = require('path'),
models = {};
ex
【文件预览】:
hapi-sql-master
----lib()
--------index.js(1KB)
----.travis.yml(37B)
----LICENSE(1KB)
----test()
--------models()
--------index.js(3KB)
----README.md(2KB)
----Makefile(232B)
----.gitignore(637B)
----index.js(35B)
----package.json(792B)
----.nvmrc(5B)