Skip to main content

Model Service

The adapter provides a way to create a new service to bind to the egose-acl Model API endpoints.

import egoseAdapter from '@egose/adapter-js';

const adapter = egoseAdapter.createAdapter({ baseURL: 'http://127.0.0.1:3000/api' });

interface User {
name: string;
role: string;
public: boolean;
[key: string]: any;
}

const userService = adapter.createModelService<User>({ modelName: 'User', basePath: 'users' });