@source4society/scepter-endpoints

0.0.2 • Public • Published

SCEPTER-endpoints

scepter-logo

js-standard-style

Build Status

codecov

Classes useful for service endpoints to inherit from, that can provide basic responses for success or error, and can distinguish between public and private endpoints.

Usage

Add this library to your project via npm or yarn with the command:

npm install -S @source4society/scepter-endpoints

or yarn add @source4society/scepter-endpoints

Then in your code, you can import the utility class:

import { ServiceEndpoint, PublicEndpoint, PrivateEndpoint } from '@source4society/scepter-endpoints';

or for commonJS

const { ServiceEndpoint, PublicEndpoint, PrivateEndpoint } = require('@source4society/scepter-endpoints').ServiceEndpoint

Classes

ServiceEndpoint

This class overrides successResponse and errorResponse from the GenericHandler parent class to return a JSON response that is compatible with http/https (ie for AWS Lambda)

PublicEndpoint

Under Construction - Will be used to setup public endpoints

PrivateEndpoint

Under Construction - Will be used to setup private endpoints

Readme

Keywords

none

Package Sidebar

Install

npm i @source4society/scepter-endpoints

Weekly Downloads

1

Version

0.0.2

License

AGPL-3.0

Unpacked Size

97.7 kB

Total Files

19

Last publish

Collaborators

  • danfredriksen