Skip to main content

Function: extractServingEndpoints()

Function: extractServingEndpoints()

function extractServingEndpoints(serverFilePath: string): 
  | Record<string, EndpointConfig>
  | null;

Extract serving endpoint config from a server file by AST-parsing it. Looks for serving({ endpoints: { alias: { env: "..." }, ... } }) calls and extracts the endpoint alias names and their environment variable mappings.

Parameters

ParameterTypeDescription
serverFilePathstringAbsolute path to the server entry file

Returns

| Record<string, EndpointConfig> | null

Extracted endpoint config, or null if not found or not extractable

Databricks Developer Hub

Ready to ship your next agentic app in minutes?

Read docs