> For the complete documentation index, see [llms.txt](https://kravets.gitbook.io/enkanetwork/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kravets.gitbook.io/enkanetwork/examples/fastify-api.md).

# Fastify API

{% hint style="info" %}

### [Fastify](https://fastify.dev/) - fast and low overhead web framework, for Node.js

{% endhint %}

{% code overflow="wrap" %}

```typescript
import Fastify from "fastify";
import { EnkaNetwork } from "enkanetwork";

const fastify = Fastify();
const port = 80;
const enka = new EnkaNetwork();

fastify.get("/:language/:uid", async (req, res) => {
    const { language, uid } = req.params;

    return await enka.fetchUser(uid, language); // error hanling already work! Fastify > Express
});

await enka.assetsUpdater.fetchAssets();
fastify
    .listen({ port, host: "::" })
    .then(() => console.log(`[SERVER] Server listening on port ${port}`));

```

{% endcode %}

<figure><img src="https://129309102-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHRuRVaMzLuUsL0mMhv72%2Fuploads%2FGrQFG2rbFUNJfISTQZnk%2Fimage.png?alt=media&amp;token=0506c6c8-fb9b-49d6-a4d6-2e0efe5e97ed" alt=""><figcaption></figcaption></figure>
