Mastra.getServer()
.getServer() 方法用于检索在 Mastra 实例中配置的服务器配置。
🌐 The .getServer() method is used to retrieve the server configuration that has been configured in the Mastra instance.
使用示例Direct link to 使用示例
🌐 Usage example
mastra.getServer();
参数Direct link to 参数
🌐 Parameters
此方法不接受任何参数。
🌐 This method does not accept any parameters.
返回Direct link to 返回
🌐 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.
相关Direct link to 相关
🌐 Related