API
Installation
Add the API console to an AntelopeJS project that runs the DMS, an API provider and a database.
template-dms-demo already loads this module with everything it needs. Start there to try it.
Add the module
From the project root:
Terminal
ajs project modules add @antelopejs/dms-api
The command adds a dms-api entry to the modules map of antelope.config.ts and installs it. To add the entry by hand instead, write it and run pnpm exec ajs project modules install:
antelope.config.ts
"dms-api": {
source: {
type: "package",
package: "@antelopejs/dms-api",
version: ">=0.4.0 <1.0.0",
},
},
Configure it (optional)
Every option has a default; most of them can also be changed later from the API settings page. See Configuration.
Restart the backend, then the frontend
Restart the backend first: the module registers its Vue frontend module when it starts. Then restart ajs dms dev, or rebuild with ajs dms build.
Open the console
Open Modules → API. /modules/api redirects to the Overview.
Try it with traffic
The repository's playground sends its demo storefront routes a few hundred requests (healthy, slow, failing and client errors), so every page has something to show:
Terminal
pnpm install && pnpm dev # backend
pnpm frontend:dev # dashboard
pnpm --dir playground traffic # demo traffic