Something went wrong. Try again.
a Page to view some global statistics about Modrinth modrinth-statistics.tobinio.dev
Something went wrong. Try again.
modrinth-statistics nuxt.config.ts
1.9 kB · 102 lines
TypeScript
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103import { cpSync } from "node:fs";
const simple_types = ["projects", "versions", "authors", "files", "revenue"];const project_types = [ "mod", "plugin", "datapack", "shader", "resourcepack", "modpack",];
var urls = [];
for (const type of simple_types) { urls.push( `https://modrinth-statistics.tobinio.dev/charts?project_type=${type}`, );}
for (const type of project_types) { urls.push( `https://modrinth-statistics.tobinio.dev/charts?project_type=${type}&stat=count`, `https://modrinth-statistics.tobinio.dev/charts?project_type=${type}&stat=downloads`, `https://modrinth-statistics.tobinio.dev/charts?project_type=${type}&stat=versions`, );}
export default defineNuxtConfig({ imports: { scan: false, }, devtools: { enabled: true }, future: { compatibilityVersion: 4, }, app: { head: { link: [ { rel: "icon", type: "image/x-icon", href: "/favicon.ico" }, { rel: "icon", type: "image/png", sizes: "256x256", href: "/favicon.png", }, { rel: "icon", type: "image/svg+xml", href: "/favicon.svg" }, { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png", }, ], }, }, site: { url: "https://modrinth-statistics.tobinio.dev", }, sitemap: { urls: urls, }, hooks: { "nitro:build:public-assets"() { cpSync( "server/database/migrations", ".output/server/database/migrations", { recursive: true, }, ); }, }, runtimeConfig: { db: { url: undefined, }, noDbWrite: undefined, metadataBase: undefined, }, nitro: { devStorage: { cache: { driver: "null", }, }, experimental: { tasks: true, }, scheduledTasks: { "0 * * * *": ["analyze"], }, }, css: ["~/assets/css/main.css"], modules: [ "@nuxt/icon", "@vueuse/nuxt", "@nuxtjs/sitemap", "@nuxt/test-utils/module", "@nuxtjs/tailwindcss", ], compatibilityDate: "2025-07-16",});