> For the complete documentation index, see [llms.txt](https://koii-network.gitbook.io/getting-started/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://koii-network.gitbook.io/getting-started/build-dapps-with-koii/template-library/leaderboard-app/customization/services.md).

# Services

### General Structure

```
📦services
 ┣ 📂axios
 ┃ ┗ 📜index.ts
 ┣ 📂port
 ┃ ┗ 📜index.js
 ┗ 📂utils
 ┃ ┗ 📜index.ts

```

### Axios

The Axios service is responsible for creating the default `axios` config that's been used for every single API call. For example:<br>

```
import axios from "axios";
const customAxios = axios.create({
  // The base URL of your api endpoint.
  baseURL: process.env.REACT_APP_BUNDLER_API_URL
});

// Global axios headers used in every single api call.
customAxios.defaults.headers.common["Content-Type"] = "application/json";
customAxios.defaults.headers.post["Content-Type"] = "application/json";
customAxios.defaults.headers.common["Access-Control-Allow-Origin"] = "*";

export default customAxios;
```

### PoRT

Implementation of the [**Koii-Port**](https://github.com/koii-network/koi-PoRT)

```
import { PoRT } from "@_koi/port";

let port = new PoRT({
  trustedNodeAddress: process.env.REACT_APP_NODE_URL,
  node: 5
});

export default port;
```

and this is to be used when you want to trigger an attention to the PoRT using `propagatePoRT`

```
import port from "services/port";
const nftId = -1BzhktwhTdIKDeQNOM5jW6LALHUSpoOMFUJAd_s1KY; // Random nft id
port.propagatePoRT(nftId);
```

### Utils

Collection of different utility functions that you can add to. e.g [**services/utils**](https://github.com/koii-network/koii.X/blob/main/src/services/utils/index.ts) &#x20;
