Licence
Apache-2.0
Version
1.3.5
Deps
8
Size
94 kB
Vulns
0
Weekly
0
Cloudify UI Common Backend
This package contains common TypeScript code for Cloudify UI backend applications.
The following features are provided by the package:
- Database connection and access handling - see
getDbModulefunction - Logging framework initialization - see
initLoggingfunction - Database migration capabilities - see
runMigrationfunction
Installation
npm install cloudify-ui-common-backend
Usage
Example of how to create logger and send a log:
import { initLogging } from 'cloudify-ui-common-backend';
const loggerFactory = initLogging({ logLevel: "debug" });
const logger = loggerFactory.getLogger('MyCatagory');
logger.log('Something happened!')
Development
- add new code to
srcfolder - remember to export new files in
src/index.ts(otherwise the new code will not be available in the distribution package) - build:
npm run build(TypeScript compilation) - test:
npm run test(unit testing with Jest testing framework),npm run lint(static analysis, code style check) andnpm run check-types(TypeScript types check) - document your code (we are using JSdoc block tags)