@onr/core
TypeScript icon, indicating that this package has built-in type declarations

0.41.2 • Public • Published

onr-core

TODO: description

Usage

How to create a plugin

import { App, Plugin } from '@onr/core';
import { UserService } from './services';

export class UserPlugin implements Plugin {
  public name = 'UserPlugin';

  async bootstrap(app: App): Promise<void> {
    this.registerServices(app);
  }

  private registerServices(app: App) {
    const adminAxiosInstance = app.apis.adminAxiosInstance;

    const userService = UserService.fromAxiosInstanceAndName<UserService>(adminAxiosInstance, 'users');

    app.addService<UserService>('userService', userService);
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @onr/core

Weekly Downloads

30

Version

0.41.2

License

ISC

Unpacked Size

252 kB

Total Files

364

Last publish

Collaborators

  • l443018
  • koshuang