@codetanzania/majifix-alert
Version:
An incident reporting service to notify citizens in case of service disruption such as lack of water, network maintenance etc.
86 lines (80 loc) • 1.75 kB
JavaScript
/**
* @name majifix-alert
* @description A representation of an alert which notify citizens in
* case of service disruption such as lack of water, network maintenance etc.
*
* @author Benson Maruchu <benmaruchu@gmail.com>
* @author lally elias <lallyelias87@gmail.com>
* @since 0.1.0
* @version 0.1.0
* @license MIT
* @example
*
* const { Alert, start } = require('@codetanzania/majifix-alert');
* start(error => { ... });
*
*/
import { pkg } from '@lykmapipo/common';
import { apiVersion as httpApiVersion } from '@lykmapipo/env';
import { start } from '@lykmapipo/express-common';
import Alert from './alert.model';
import alertRouter from './alert.http.router';
/**
* @name info
* @description package information
* @type {object}
*
* @author lally elias <lallyelias87@gmail.com>
* @since 1.0.0
* @version 0.1.0
*/
export const info = pkg(
`${__dirname}/package.json`,
'name',
'description',
'version',
'license',
'homepage',
'repository',
'bugs',
'sandbox',
'contributors'
);
/**
* @name Alert
* @description Alert model
*
* @author lally elias <lallyelias87@gmail.com>
* @since 0.1.0
* @version 0.1.0
*/
export { Alert };
/**
* @name alertRouter
* @description alert http router
*
* @author lally elias <lallyelias87@gmail.com>
* @since 0.1.0
* @version 0.1.0
*/
export { alertRouter };
/**
* @name apiVersion
* @description http router api version
* @type {string}
*
* @author lally elias <lallyelias87@gmail.com>
* @since 0.1.0
* @version 0.1.0
*/
export const apiVersion = httpApiVersion();
/**
* @function start
* @name start
* @description start http server
*
* @author lally elias <lallyelias87@gmail.com>
* @since 0.1.0
* @version 0.1.0
*/
export { start };