Skip to main content

getServiceByPath

Callable

  • getServiceByPath(directory: string): (path: string) => Promise<Service>

  • Returns a service from EventCatalog by it's path.

    @example
    import utils from '@eventcatalog/utils';

    const { getServiceByPath } = utils('/path/to/eventcatalog');

    // Returns a service from the catalog by it's path
    const service = await getServiceByPath('/services/InventoryService/index.mdx');