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 🙏

© 2026 – Pkg Stats / Ryan Hefner

eo-services-functions-sls

v0.4.0

Published

EO Web Services as Serverless functions

Downloads

2

Readme

Serverless Functions (FaaS) for EO API

In this repo you'll find the backend functions for web (micro) services.

Currently available 'services':

  • services/content-hub : Contains micro services to communicate with headless CMS / Content HUB

    • /articles [GET] all, by Id, by slug , by environment --> items:[]
    • /forms/:id [GET] by Id --> item:{}
    • /pages [GET] all, by Id, by slug --> items:[]
    • /persons [GET] all, by Id, by slug --> items:[]
    • /pressreleases [GET] all, by Id, by slug --> items:[]

    Filters (url params):

    • domain
    • limit
    • offset
    • textsearch

    Related

    • /persons/:presenterId/pressreleases?personType=contact|presenter
  • services/contact : Microservice for contact by email

    • /mailform [POST] form --> formData:{}
  • services/poms : Microservice for Poms data

    • /poms/:mid [GET] by Mid --> item:{}

How to install locally

Please make sure to have following dependencies installed locally:

  • Node 10.x ($ nvm use)
  • Serverless Framework ($ npm i serverless -g)
  • Azure CLI ($ brew update && brew install azure-cli)
  • Install the CLI for EO's "Veilige Opslag": Veilige Opslag

Before you begin

... install npm packages (make sure you have set env var NPM_TOKEN that corresponds with NPM Org eo): $ npm i

Local development

Decrypt and copy the .env-file from EO's "Veilige Opslag":

$ veilige-opslag fetch -elus api

To run a Serverless API server locally (offline), run this in root folder:

$ npm run dev This will create local folders and fire up a webserver at http://0.0.0.0:7071. Find local endpoints in Terminal logs Http Functions:. When server has started, you can make API calls to localhost. Event data will be outputted to terminal.

~~Invoke function (locally)~~

Status:

  • Invoke function currently doesn't work due to Webpack hooks
  • Looks up functions in file serverless.yml at root
$ sls invoke local -f {functionName}

Deploy to Azure

  1. Make sure you're not logged in with Azure in your shell $ az logout

  2. Easily activate Azure service principal by loading the appropriate environment variables using EO's CLI for "Veilige Opslag":

    $ source ./loadenv.sh
  3. To deploy to (default) dev stage, run: $ sls deploy

  4. Make sure to add the environment variables as "Application settings" in Azure Function App. https://docs.microsoft.com/bs-latn-ba/azure/azure-functions/functions-how-to-use-azure-function-app-settings

Serverless (Azure) documentation

OpenAPI 3.0 driven documentation

1. Writing documentation

We've adopted (a clone of) the serverless-openapi-documentation plugin to document our API. This makes it possible to maintain our documentation right within our serverless.yml. As close to the code as possible!

Please refer to the [https://www.serverless.com/plugins/serverless-openapi-documentation/ ](Serverless OpenAPI Documentation) to write your docs.

2. Generate the OpenAPI Specification

Just use the following command to generate the specification:

$ serverless openapi generate

3. Viewing documentation

We import the resulting OpenAPI specification in our SwaggerHub: https://app.swaggerhub.com/apis-docs/EO-Studio-Digitaal/eo-api/1 (credentials reside in our LastPass account).

Improvements

  • implement Serverless @multicloud library (platform agnostic sls app)
  • invoke functions locally

Development Urls

##ARTICLES ###=list= http://localhost:7071/api/articles

##PAGES ###=list= http://localhost:7071/api/pages

##PRESSRELEASES ###=list= http://localhost:7071/api/pressreleases http://localhost:7071/api/pressreleases?offset=0&limit=2 http://localhost:7071/api/pressreleases?offset=0&limit=20&domain=corporate-eo-staging ###=textsearch= http://localhost:7071/api/pressreleases?offset=0&limit=20&domain=corporate-eo-staging&textsearch=Anne%20Frank ###=get by id= http://localhost:7071/api/pressreleases/65dee676-6852-4f6c-8e38-166b35f83ac4 ###=get by slug= http://localhost:7071/api/pressreleases?slug=het-is-weer-tijd-voor-een-nieuwe-naam-voor-de-afdeling-die-internet-dingen-doet

##PERSONS ###=list= http://localhost:7071/api/persons ###=get by slug= http://localhost:7071/api/persons?slug=deborah-van-geest ###=get by id= http://localhost:7071/api/persons/6eefb87b-4854-4866-9ace-d46bbc501e06 ###=textsearch= http://localhost:7071/api/persons?textsearch=knevel ###=nested= http://localhost:7071/api/persons/:personId/pressreleases?personType=contact|presenter http://localhost:7071/api/persons/6eefb87b-4854-4866-9ace-d46bbc501e06/pressreleases?personType=contact http://localhost:7071/api/persons/ec8dc644-505f-487d-af76-511489b1c547/pressreleases?personType=presenter http://localhost:7071/api/persons/ec8dc644-505f-487d-af76-511489b1c547/pressreleases -> not implemented