0.0.22 • Published 11 months ago
@cashoco/shared v0.0.22
Common module for code sharing.
Increment version in package.json file major.minor.patch
Build
npm run build
Publish
npm publish --access public
How to install
npm install @cashoco/shared
How to use middlewares
To use the morganMiddeware
- import the middleware
import { morganMiddleware } from '@cashoco/shared';
- add it to main file of your project
app.use(morganMiddleware);
To use the errorHandler middleware
- import the middleware
import { errorHandler } from '@cashoco/shared';
- add it to main file of your project
app.use(errorHandler);
To use the camelToSnake middleware
- import the middleware
import { camelToSnake } from '@cashoco/shared';
- add it to main file of your project
app.use(camelToSnake);
To use the ipinfo middleware
- install the ipinfo package
npm i node-ipinfo
- import the middleware
import { ipToGeoMiddleware } from '@cashoco/shared';
- create a ipinfoWrapper instance and save it in the app locals in the main file as
app.locals.ipinfoWrapper = new IPinfoWrapper('your-token')
- add the middleware as
app.use(ipToGeoMiddleware)
0.0.20
1 year ago
0.0.21
12 months ago
0.0.22
11 months ago
0.0.15
1 year ago
0.0.16
1 year ago
0.0.17
1 year ago
0.0.18
1 year ago
0.0.19
1 year ago
0.0.14
1 year ago
0.0.13
2 years ago
0.0.12
2 years ago
0.0.11
2 years ago
0.0.10
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago