1.0.8 • Published 4 years ago

iformapi-lambda2 v1.0.8

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

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)
});
1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago