> Discover all available pages from the documentation index: https://mastra.zisheng.pro/zh-TW/llms.txt # Mastra.getServer() `.getServer()` 方法用於取得 Mastra 執行個體中已設定的 server 設定。 ## 使用範例 ```typescript mastra.getServer() ``` ## 參數 此方法不接受任何參數。 ## 傳回值 **server** (`ServerConfig | undefined`): 已設定的 server 設定,包括 port、host、studioBase、timeout、API route、middleware、CORS 設定和建置選項;如果未設定 server,則為 undefined。 ## 相關內容 - [Server 部署](https://mastra.zisheng.pro/zh-TW/docs/deployment/mastra-server) - [Server 設定](https://mastra.zisheng.pro/zh-TW/docs/server/custom-api-routes)