commmm
parent
55a0040734
commit
b2a42533b6
35
package.json
35
package.json
|
@ -1,14 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "iut-project-cemal",
|
"name": "hapipal-boilerplate",
|
||||||
"version": "1.0.0",
|
"version": "3.0.0",
|
||||||
"description": "",
|
|
||||||
"author": "",
|
|
||||||
"license": "ISC",
|
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"directories": {
|
|
||||||
"lib": "lib",
|
|
||||||
"test": "test"
|
|
||||||
},
|
|
||||||
"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 -I \"__core-js_shared__,CSS,regeneratorRuntime,core\" -L",
|
||||||
|
@ -17,14 +10,7 @@
|
||||||
"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",
|
"joi": "17.x.x"
|
||||||
"objection": "2.x.x",
|
|
||||||
"@hapipal/schwifty": "6.x.x",
|
|
||||||
"sqlite3": "5.0.2",
|
|
||||||
"exiting": "6.0.1"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"knex": "0.21.x"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@hapi/code": "8.x.x",
|
"@hapi/code": "8.x.x",
|
||||||
|
@ -32,18 +18,17 @@
|
||||||
"@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/hoek": "9.x.x",
|
|
||||||
"@hapi/inert": "6.x.x",
|
"@hapi/inert": "6.x.x",
|
||||||
"@hapi/lab": "23.x.x",
|
"@hapi/lab": "24.x.x",
|
||||||
"@hapi/vision": "6.x.x",
|
"@hapi/vision": "6.x.x",
|
||||||
"babel-eslint": "10.x.x",
|
|
||||||
"@hapipal/confidence": "6.x.x",
|
"@hapipal/confidence": "6.x.x",
|
||||||
"dotenv": "8.x.x",
|
|
||||||
"eslint": "7.x.x",
|
|
||||||
"hapi-swagger": "14.x.x",
|
|
||||||
"@hapipal/hpal": "3.x.x",
|
"@hapipal/hpal": "3.x.x",
|
||||||
"@hapipal/hpal-debug": "2.x.x",
|
"@hapipal/hpal-debug": "2.x.x",
|
||||||
"knex": "^0.21.16",
|
"@hapipal/toys": "3.x.x",
|
||||||
"@hapipal/toys": "3.x.x"
|
"babel-eslint": "10.x.x",
|
||||||
|
"dotenv": "8.x.x",
|
||||||
|
"eslint": "7.x.x",
|
||||||
|
"exiting": "6.x.x",
|
||||||
|
"hapi-swagger": "14.x.x"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
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` });
|
||||||
|
@ -13,14 +12,14 @@ module.exports = new Confidence.Store({
|
||||||
server: {
|
server: {
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
port: {
|
port: {
|
||||||
$env: 'PORT',
|
$param: 'PORT',
|
||||||
$coerce: 'number',
|
$coerce: 'number',
|
||||||
$default: 3000
|
$default: 3000
|
||||||
},
|
},
|
||||||
debug: {
|
debug: {
|
||||||
$filter: { $env: 'NODE_ENV' },
|
$filter: 'NODE_ENV',
|
||||||
$default: {
|
$default: {
|
||||||
log: ['error'],
|
log: ['error', 'start'],
|
||||||
request: ['error']
|
request: ['error']
|
||||||
},
|
},
|
||||||
production: {
|
production: {
|
||||||
|
@ -34,35 +33,9 @@ module.exports = new Confidence.Store({
|
||||||
plugin: '../lib', // Main plugin
|
plugin: '../lib', // Main plugin
|
||||||
options: {}
|
options: {}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
plugin: './plugins/swagger'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
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: { $env: 'NODE_ENV' },
|
$filter: 'NODE_ENV',
|
||||||
$default: '@hapipal/hpal-debug',
|
$default: '@hapipal/hpal-debug',
|
||||||
production: Toys.noop
|
production: Toys.noop
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue