master
Devin Ivy 2021-04-11 23:24:33 -04:00 committed by cemal
parent b2a42533b6
commit d08aa81411
4 changed files with 136 additions and 107 deletions

View File

@ -4,13 +4,18 @@
"main": "lib/index.js", "main": "lib/index.js",
"scripts": { "scripts": {
"start": "node server", "start": "node server",
"test": "lab -a @hapi/code -I \"__core-js_shared__,CSS,regeneratorRuntime,core\" -L", "test": "lab -a @hapi/code -L",
"lint": "eslint ." "lint": "eslint ."
}, },
"dependencies": { "dependencies": {
"@hapi/boom": "9.x.x", "@hapi/boom": "9.x.x",
"@hapipal/haute-couture": "4.x.x", "@hapipal/haute-couture": "4.x.x",
"joi": "17.x.x" "@hapipal/schwifty": "6.x.x",
"joi": "17.x.x",
"objection": "2.x.x"
},
"peerDependencies": {
"knex": "0.21.x"
}, },
"devDependencies": { "devDependencies": {
"@hapi/code": "8.x.x", "@hapi/code": "8.x.x",
@ -18,9 +23,8 @@
"@hapi/eslint-plugin-hapi": "4.x.x", "@hapi/eslint-plugin-hapi": "4.x.x",
"@hapi/glue": "8.x.x", "@hapi/glue": "8.x.x",
"@hapi/hapi": "20.x.x", "@hapi/hapi": "20.x.x",
"@hapi/inert": "6.x.x", "@hapi/hoek": "9.x.x",
"@hapi/lab": "24.x.x", "@hapi/lab": "24.x.x",
"@hapi/vision": "6.x.x",
"@hapipal/confidence": "6.x.x", "@hapipal/confidence": "6.x.x",
"@hapipal/hpal": "3.x.x", "@hapipal/hpal": "3.x.x",
"@hapipal/hpal-debug": "2.x.x", "@hapipal/hpal-debug": "2.x.x",
@ -29,6 +33,7 @@
"dotenv": "8.x.x", "dotenv": "8.x.x",
"eslint": "7.x.x", "eslint": "7.x.x",
"exiting": "6.x.x", "exiting": "6.x.x",
"hapi-swagger": "14.x.x" "knex": "0.21.x",
"sqlite3": "5.x.x"
} }
} }

View File

@ -3,6 +3,7 @@
const Dotenv = require('dotenv'); const Dotenv = require('dotenv');
const Confidence = require('@hapipal/confidence'); const Confidence = require('@hapipal/confidence');
const Toys = require('@hapipal/toys'); const Toys = require('@hapipal/toys');
const Schwifty = require('@hapipal/schwifty');
// Pull .env into process.env // Pull .env into process.env
Dotenv.config({ path: `${__dirname}/.env` }); Dotenv.config({ path: `${__dirname}/.env` });
@ -33,6 +34,29 @@ module.exports = new Confidence.Store({
plugin: '../lib', // Main plugin plugin: '../lib', // Main plugin
options: {} options: {}
}, },
{
plugin: '@hapipal/schwifty',
options: {
$filter: 'NODE_ENV',
$default: {},
$base: {
migrateOnStart: true,
knex: {
client: 'sqlite3',
useNullAsDefault: true, // Suggested for sqlite3
connection: {
filename: ':memory:'
},
migrations: {
stub: Schwifty.migrationsStubPath
}
}
},
production: {
migrateOnStart: false
}
}
},
{ {
plugin: { plugin: {
$filter: 'NODE_ENV', $filter: 'NODE_ENV',