跳到主要内容
非官方简体中文翻译,内容版权归 Mastra 所有,遵循 Apache-2.0 许可。

Mastra.getServer()

The .getServer() method is used to retrieve the server configuration that has been configured in the Mastra instance.

Usage example
Usage example的直接链接

mastra.getServer()

Parameters
Parameters的直接链接

This method doesn't accept any parameters.

Returns
Returns的直接链接

server:

ServerConfig | undefined
The configured server configuration including port, host, studioBase, timeout, API routes, middleware, CORS settings, and build options, or undefined if no server has been configured.
On this page