@feimsoft/crudgateway
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

CRUD Gateway

Installation

npm

npm install @feimsoft/crudgateway --save

yarn

yarn add @feimsoft/crudgateway

Installation

Import:

// using an ES6 transpiler, like babel
import { crudGateway, CrudGateway } from '@feimsoft/crudgateway';

Create your gateway:

export interface DeviceModel {
    id: number;
    name: string;
}

@crudGateway({ resource: 'device' })
export class DeviceGateway extends CrudGateway<DeviceModel> {

}

And use it:

import axios from 'axios';
const axiosInstance = axios.create();
const deviceGateway = new DeviceGateway(axiosInstance);
const device = await deviceGateway.create({
    name: 'Samsung Galaxy'
});

Readme

Keywords

none

Package Sidebar

Install

npm i @feimsoft/crudgateway

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

355 kB

Total Files

31

Last publish

Collaborators

  • bvadell