npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

iopa-serverless

v1.4.0

Published

API-First Serverless Cloud Function manager for Internet of Things (IoT), based on Internet of Protocols Alliance (IOPA) specification

Downloads

5

Readme

IOPA iopa-serverless

NPM

About

This repository contains a simple abstaction layer to translate various serverless host environments and localhost to a common open-standards defined request and response context.

The opportunity

Serverless hosts including AWS Lambda, Microsoft Azure Functions and Google Cloud Functions let you run code without provisioning or managing servers. You generally pay only for the compute time you consume - there is usually no charge when your code is not running. You can run code for virtually any type of application or backend service - all with zero administration.

The problem

It is currently not possible to reuse the same codeset across multiple cloud hosts, and yet the functionality provided by the host environment is very similar -- typically providing a request record for the inbound event trigger and a context record for the response. It is also not possible to develop and test locally without additional frameworks that vary based on the target host.

The solution

This libraryprovides a very lightweight abstraction layer to translate the request and response into a format that can be reused regardless of the host environment, and can be used locally just as easily as remotely.

It is now possible to write a single serverless function and host on multiple providers (to optimize pricing, load balance during catastrophic service provider failures etc.)

Middleware/Application Pipeline Builder: AppBuilder

app.use(middleware)

Adds a middleware node to the IOPA function pipeline. The middleware are invoked in the order they are added: the first middleware passed to app.use will be the outermost function, and the last middleware passed to Use will be the innermost.

example index.js for Azure


const iopaServerless=require('./iopa-serverless'),
      demo = require('./demo');

module.exports = iopaCloud.azure(
     demo
);

example function.json for Azure

{
    "bindings": [
        {
            "webHookType": "",
            "type": "httpTrigger",
            "direction": "in",
            "name": "req"
        },
        {
            "type": "http",
            "direction": "out",
            "name": "res"
        }
    ],
    "disabled": false
}

API Reference Specification

IOPA