@lemonldap-ng/conf
TypeScript icon, indicating that this package has built-in type declarations

0.6.4 • Public • Published

@lemonldap-ng/conf

@lemonldap-ng/conf is the configuration accessor.

Synopsis

import Conf from '@lemonldap-ng/conf'
import {LocalConf} from '@lemonldap-ng/types' // typescript only

const minimalConf: LocalConf = {
  confFile: '/path/to/lemonldap-ng.ini' // default to /etc/lemonldap-ng/lemonldap-ng.ini
}

const confAccessor = new Conf(localConf)

// read a lemonldap-ng.ini section
const localConf = confAccessor.getLocalConf('node-handler')

// get configuration from LemonLDAP::NG database
confAccessor.getConf().then ( (conf: LLNG_Conf) => {
  //
}).catch( e => {
  throw new Error(e)
})

@lemonldap-ng/conf is a component of lemonldap-ng-handler, a Node.js handler for LemonLDAP::NG WebSSO.

Package Sidebar

Install

npm i @lemonldap-ng/conf

Weekly Downloads

0

Version

0.6.4

License

GPL-2.0-or-later

Unpacked Size

53.9 kB

Total Files

9

Last publish

Collaborators

  • xguimard