# iformapi-lambda2

> iformapi helper function for pushing into lambda function

Latest version **1.0.8** (published 2019-12-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install iformapi-lambda2
pnpm add iformapi-lambda2
yarn add iformapi-lambda2
bun add iformapi-lambda2
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2019-12-29 |
| First published | 2019-12-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | TPHAM |
| Maintainers | tpham21 |

## Links

- npm: https://www.npmjs.com/package/iformapi-lambda2
- npm.io page: https://npm.io/package/iformapi-lambda2

## Dependencies (3)

- [qs](https://npm.io/package/qs.md) ^6.9.1
- [axios](https://npm.io/package/axios.md) ^0.19.0
- [expressjs](https://npm.io/package/expressjs.md) ^1.0.1

## Recent versions

- 1.0.8 (latest) — 2019-12-29
- 1.0.7 — 2019-12-27
- 1.0.6 — 2019-12-27
- 1.0.5 — 2019-12-27
- 1.0.4 — 2019-12-27
- 1.0.3 — 2019-12-27
- 1.0.2 — 2019-12-27
- 1.0.1 — 2019-12-27
- 1.0.0 — 2019-12-27

## README

# iformapi-lambda
 
A set of proxy functions for use in lambda and express server in general.

Usage (Amplify):
```
amplify init
amplify add api
--REST
--Create new Lambda function
--Serverless express function
--add path /api
--add path /token
```

```
npm install iformapi-lambda
```


In app.js
```
var iformapi = require('iformapi-lambda')

const client_id = 'XXXXXXXXXXXXXXXXXX'
const client_secret = 'XXXXXXXXXXXXXX'
const servername = '<yourservername>'
const ifbConfig = {
  client_id: client_id,
  client_secret: client_secret,
  servername: servername
}

app.get('/api', function(req,res){
  iformapi.get(ifbConfig, req, res)
});

app.post('/api', function(req,res){
  iformapi.post(ifbConfig, req, res)
});

app.put('/api', function(req,res){
  iformapi.put(ifbConfig, req, res)
});

app.delete('/api', function(req,res){
  iformapi.delete(ifbConfig, req, res)
});

app.post('/token', function(req,res){
  iformapi.getToken(ifbConfig, req, res)
});
```

---
_Source: https://npm.io/package/iformapi-lambda2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
