Skip to content

Commit

Permalink
chore: topics/k1ch/jsDoc for usherDb knex instance
Browse files Browse the repository at this point in the history
  • Loading branch information
k1ch committed Dec 28, 2023
1 parent 22cdcbb commit 0d967e1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions database/layer/knex.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
const knex = require('knex');
const knexDbConfig = require('../knexfile');

/**
* Usher DB connection instance.
* @name usherDb
* @type {import('knex')}
* @desc This instance provides a connection to the Usher database using Knex.js
* @example // To import usherDb instance
* const { usherDb } = require('./knex');
* @example // To perform a database query
* const persona = await usherDb('personas').where('key', personaKey).first();
*/
const usherDb = knex(knexDbConfig);

module.exports = { usherDb }

0 comments on commit 0d967e1

Please sign in to comment.