diff --git a/docs/guide/index.md b/docs/guide/index.md index 646afe7..0294bd9 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -51,12 +51,22 @@ Alternatively, you can use `onsolve=""` directly within the widget or wrap the w Cap is fully self-hosted, so you'll need to start a server with the Cap API running at the same URL as specified in the `data-cap-api-endpoint` attribute. This is easy since we've already pre-made a library to help you generate and validate challenges for you. -Start by installing it using npm or bun: +Start by installing it: +::: code-group + +```bash [bun] +bun add @cap.js/server ``` + +```bash [npm] npm i @cap.js/server ``` +```bash [pnpm] +pnpm i @cap.js/server +``` + > [!NOTE] > It is recommended to use at least Node.js 14 or Bun 1.0.0. You might experience multiple issues on older versions of these runtimes. @@ -190,4 +200,4 @@ Once the token is generated and captured, you can use it later to validate the u await cap.validateToken("..."); // returns { success: Boolean } ``` -Note that the token will immediately be deleted after this. To prevent this, use `await cap.validateToken("...", { keepToken: true })`. \ No newline at end of file +Note that the token will immediately be deleted after this. To prevent this, use `await cap.validateToken("...", { keepToken: true })`.