diff --git a/database/index.js b/database/index.js index bb4a8d4..9ed7474 100644 --- a/database/index.js +++ b/database/index.js @@ -3,6 +3,8 @@ const knexDb = knex({ client: 'pg', connection: 'postgres://localhost/jwt_test' const bookshelf = require('bookshelf'); const securePassword = require('bookshelf-secure-password'); const db = bookshelf(knexDb); +db.plugin('bookshelf-virtuals-plugin'); + db.plugin(securePassword); module.exports = db; diff --git a/package.json b/package.json index 436cabc..42eda11 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "body-parser": "^1.18.2", "bookshelf": "^0.13.3", "bookshelf-secure-password": "^3.0.1", + "bookshelf-virtuals-plugin": "^0.1.1", "concurrently": "^3.5.1", "dotenv": "^5.0.1", "express": "^4.16.3",