Socket
Socket
Sign inDemoInstall

@dgroux/api-framework

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dgroux/api-framework

## This is an api library designed for use in Newsteam microservices.


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@newsteam/api-framework

This is an api library designed for use in Newsteam microservices.

Features

  • Fully type safe
  • Input and Output parsing and validation
  • Services and middleware
  • Proxy to remote api-framework implementation
  • Api handler discovery (no manually hooking up handlers)
  • OpenAPI v3 compatible
  • Documentation interface
  • Ability to document endpoints with markdown
  • Extensive logging capabilities

Examples

hello.ts

import { Api } from "@lib/request";
import { AnyShape } from "@lib/shape";

export default class extends Api.base({

    route: "/hello",
    permission: "public",
    description: "",
    input: AnyShape,
    output: AnyShape }) {

    async handle() {

        this.result = { hello: "world" };

    }
}

index.ts

import { start } from "@lib/startup";

start({
    port: 8080,
    endponts: "endpoints/**/*.ts"
});

FAQs

Package last updated on 22 Jul 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc