npm.io
1.0.0 • Published 4 years ago

express-common-libs

Licence
Apache License
Version
1.0.0
Deps
3
Size
25 kB
Vulns
23
Weekly
0
Stars
1

Express Common Libs

A simple library to implement standard libs that are used by express APIs

Content


Install

npm install @obi-tec/express-common-libs

See all tags clicking here.

Usage

Axios Library

Implementation of axios library to log all sent requests and their respective duration.

const { axios } = require('@obi-tec/express-common-libs');

const options = {};
await axios.default.get(url, options);

Node-Cache Library

Implementation of node-cache library to create a helper function to get and set.

const { cache } = require('@obi-tec/express-common-libs');
const key = 'cache-key';
cosnt ttl = 300; // 5 minutes

cache.set(key, 'value', ttl);
cache.get(key);

Status

Open for contribuitions...

Keywords