Function: getServiceByPath()
getServiceByPath(
directory): (path) =>Promise<Service>
Defined in: services.ts:54
Returns a service from EventCatalog by it's path.
Parameters
| Parameter | Type |
|---|---|
directory | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
Promise<Service>
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');