# Configuration

1. Enhance the file `src/app/spartacus/spartacus-configuration.module.ts` with the following config:

```ts
provideConfig(<OccConfig>{
  backend: {
    occ: {
      prefix: environment.backend.occ.prefix,
      baseUrl: environment.backend.occ.baseUrl,
    }
  },
}),
```

2. Start the spartacus instance as you would normally do: `npm run dev` (or your defined npm script)
3. Open your browser
4. Notice the message in the console: `[MSW] Mocking enabled.`
5. All mocked calls are still normally visible in the network tab of your browser's developer tools
6. You can customize the mock server by defining more option for the `mockConfig` in the file `src/main.ts`:

```ts
const mockConfig: MockConfig = {
  enableWorker: environment.mockServer || false,
  environment,
};
```

> For more information how you can configure the mock server, see the [Options](https://valantic.gitbook.io/spartacus-mock/api-reference/options) page of the api reference.

> For more information how you can define your mock-data, see the [Examples](https://valantic.gitbook.io/spartacus-mock/examples) page.

> For more information about the underlying Mock Service Worker tool, see the [MSW documentation](https://mswjs.io/docs/api/rest).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://valantic.gitbook.io/spartacus-mock/getting-started/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
