1.0.3 • Published 5 years ago

@feimsoft/crudgateway v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

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'
});
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago