New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@pinpt/fn

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pinpt/fn

A tiny micro framework for the Serverless framework for building fast λ functions

latest
Source
npmnpm
Version
0.0.13
Version published
Weekly downloads
0
-100%
Maintainers
3
Weekly downloads
 
Created
Source
pinpt-logo

A tiny micro framework for the Serverless framework for building fast λ functions

forthebadge

Setup

More coming soon....

Examples

Single Lambda

import { Logger, Request, Response, λ } from '@pinpt/fn';

export const handler = λ( async (req: Request, resp: Response) => {
  resp.json({data: 'foo'});
});

Paths with simple router

import { LambdaMethod, Logger, Request, Response, λs } from '@pinpt/fn';

export const handler = λs([
  {
		handler: async (req: Request, resp: Response) => {
			resp.json({data: 'foo'});
		},
		method: LambdaMethod.Get,
		path: '/',
	},
	{
		handler: async (req: Request, resp: Response) => {
			resp.json({data: req.params.bar});
		},
		method: LambdaMethod.Post,
		path: '/use/:bar',
	}
]);

License

All of this code is Copyright © 2018 by PinPT, Inc. and licensed under the MIT License. Pull requests welcome.

Keywords

serverless

FAQs

Package last updated on 07 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts