Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 821 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 821 Bytes

PDF-generator-client

This repository serves as the client for the PDF-generator, which is contained in the server subdirectory. The client in this directory is automatically generated using NSwag.

Usage

To utilize the client, include the following dependency in your package.json.

{
  "dependencies": {
    "@pdf/pdf-generator-client": "github:GEWIS/pdf-generator-client"
  }
}

After adding the dependency, import it into your project and instantiate a client to begin generating invoices.

import { Client } from '@pdf/pdf-generator-client';

let client =  new Client(process.env.BASE_URL);
client.generateInvoice(...);

Ensure that the BASE_URL environment variable is set appropriately to point to your PDF-generator-server instance.