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}`));