backend-common_library
v0.1.0
Published
## Version 1.1.0 ### Breaking Changes
Downloads
5
Readme
Common Library
Version 1.1.0
Breaking Changes
import winston from 'winston';
will not work anymore, switch toconsole.log
- winston transport can be updated thru environment variable
LOG_TRANSPORT
available values includesfile
,console
,colorConsole
(defaults toconsole
) - switch from node-cleanup to async-exit-hook for shutdown hook.
import {asyncShutdownHook} from "@animocabrands/backend-common_library"; asyncShutdownHook(async () => { await ..... });
To link the workspace locally start development.
yarn link
yarn start
To linked package as an dependency yarn link @animocabrands/backend-common_library
example configuration
{
"mongodb": {
// mongo url
"url": "mongodb://f1_user:f1_password@localhost:27017/f1?authSource=admin"
},
"redis": {
// redis url
"url": "redis://anonymous:password@localhost"
},
"api": {
// cors configuration
"access_control": [
"http://www.f1deltatime.com" , {
"regex" : "http[s]?:\/\/.*-stg.f1deltatime.com"
}
],
// salt for the sessionId
"secret": "dev"
}
}