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

1.0.4 • Public • Published

Core

Versed pipeline status coverage report

Versed core provides utilities to bootstrap your microservices.

Server

import { VersedKoaServer } from "@versed/core";

const server = new VersedKoaServer();

const main = async () => {
  server.addService(authSpec, new AuthService(), {
    basePath: "/v1/auth/",
  });
  server.start();
};
main().catch(e => {
  server.rootCtx.logger.error("FATAL: ", e);
});

Client

import { createVersedAxiosClient } from "@versed/core";

const client = createVersedAxiosClient();

const authService: IAuthService = client.createService<IAuthService>(authSpec);

// use auth service now
authService.Auth(ctx, {});

Readme

Keywords

none

Package Sidebar

Install

npm i @versed/core

Weekly Downloads

4

Version

1.0.4

License

ISC

Unpacked Size

53.7 kB

Total Files

51

Last publish

Collaborators

  • briansostudio