Skip to content

TypeScript API / @laikacms/vite-plugin / mountLocalApi

Function: mountLocalApi() ​

ts
function mountLocalApi(
   server, 
   repos, 
   options
): void;

Mount LaikaCMS's own JSON:API over repos at ${basePath}/storage, ${basePath}/documents, and ${basePath}/assets. No auth, no CORS — call this only from configureServer.

Parameters ​

ParameterType
serverLocalApiServer
reposLaikaRepositories
optionstrue | LaikaLocalApiOptions

Returns ​

void

Released under the MIT License.