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

@antelopejs/interface-api

v0.3.2

Published

AntelopeJS interface for HTTP and WebSocket APIs: decorator-based controllers, routes and parameter injection

Readme

@antelopejs/interface-api

The AntelopeJS interface for HTTP and WebSocket APIs. You declare controllers and routes with decorators, and the module that implements the interface serves them.

Part of AntelopeJS. Used by AntelopeJS DMS, the open-source back office for your PostgreSQL, MongoDB or RethinkDB database.

What it offers

  • Controller and PartialController group routes under a base path, with nesting through extend.
  • @Get, @Post, @Put, @Delete, and @Route map methods to endpoints. @Prefix, @Postfix, and @Monitor run before or after them.
  • @Parameter, @MultiParameter, @JSONBody, @RawBody, @BodyStream, @Context, @Result, and @WriteStream inject request data into handler arguments. @Transform changes a value before the handler receives it.
  • HTTPResult sets the status, headers, and body of a response. The body is an HTTPBody, which is a string or a value that JSON.stringify writes as JSON.
  • @WebsocketHandler and @Connection handle WebSocket connections on the same controllers.

Implementations

| Module | Notes | | ------------------------------------------------------ | ---------------------------------------- | | @antelopejs/api | HTTP and WebSocket server, CORS settings |

Install

Add the interface to the module that declares routes:

pnpm add @antelopejs/interface-api

Then add an implementation to the project:

ajs project modules add @antelopejs/api

Quick start

import {
  Controller,
  Get,
  HTTPResult,
  JSONBody,
  Parameter,
  Post,
} from "@antelopejs/interface-api";

export class BookController extends Controller("/books") {
  @Get(":id")
  async getBook(@Parameter("id") id: string) {
    return new HTTPResult(200, { id });
  }

  @Post("")
  async createBook(@JSONBody() body: { title: string }) {
    return new HTTPResult(201, body);
  }
}

The decorators register the routes when JavaScript defines the class. @antelopejs/api serves GET /books/:id and POST /books.

Documentation

Compatibility

The module declares this peer dependency:

| Package | Supported | Tested with | | ---------------------------- | ---------------- | ----------- | | @antelopejs/interface-core | >=0.4.0 <1.0.0 | 0.4.0 |

Contributing

Read CONTRIBUTING.md before you open a pull request. The local checks are:

pnpm install
pnpm run checks

License

Apache-2.0