Common Cloudify UI backend library
npm install cloudify-ui-common-backend
This package contains common TypeScript code for Cloudify UI backend applications.
The following features are provided by the package:
1. Database connection and access handling - see getDbModule function
2. Logging framework initialization - see initLogging function
3. Database migration capabilities - see runMigration function
``npm`
npm install cloudify-ui-common-backend
Example of how to create logger and send a log:
`typescript
import { initLogging } from 'cloudify-ui-common-backend';
const loggerFactory = initLogging({ logLevel: "debug" });
const logger = loggerFactory.getLogger('MyCatagory');
logger.log('Something happened!')
`
- add new code to src foldersrc/index.ts
- remember to export new files in (otherwise the new code will not be available in the distribution package)npm run build
- build: (TypeScript compilation)npm run test
- test: (unit testing with Jest testing framework), npm run lint (static analysis, code style check) and npm run check-types` (TypeScript types check)
- document your code (we are using JSdoc block tags)