Client Initialization
Once you have installed the @genzy/client library, you can now init the API.
Initialization
Standalone
- CommonJS
- ES modules
- TypeScript
const { GenzyContainer } = require("@genzy/client");
class ExampleService {
  async get() {}
}
const container = new GenzyContainer().addRemoteService(
  "http://localhost:3000",
  ExampleService
);
const { exampleService } = nimble.getAllServices();
import { GenzyContainer } from "@genzy/client";
class ExampleService {
  async get() {}
}
const container = new GenzyContainer().addRemoteService(
  "http://localhost:3000",
  ExampleService
);
const { exampleService } = nimble.getAllServices();
import { GenzyContainer } from "@genzy/client";
class ExampleService {
  async get() {}
}
const container = new GenzyContainer().addRemoteService(
  "http://localhost:3000",
  ExampleService
);
type GenzyServices = {
  exampleService: ExampleService;
};
const { exampleService }: GenzyServices = nimble.getAllServices();
Options
The complete list of available options can be found here.