-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnitro.config.ts
More file actions
40 lines (39 loc) · 1.03 KB
/
nitro.config.ts
File metadata and controls
40 lines (39 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { defineNitroConfig } from "nitropack/config";
export default defineNitroConfig({
compatibilityDate: "2026-03-06",
preset: "node-server",
srcDir: "src",
experimental: {
openAPI: true,
},
openAPI: {
// Keep docs available in prod builds.
production: "runtime",
// Use Nitro-generated spec route.
route: "/_openapi.json",
meta: {
title: "NitroCraft API",
description: "Minecraft avatars, skins, capes, renders, player lookup, formatting, and server status endpoints.",
},
ui: {
// Serve /docs from an app route so we can reliably point Scalar at /openapi.json.
scalar: false,
swagger: false,
},
},
publicAssets: [
{
// Resolved from srcDir, so use ../public for project-root static assets.
dir: "../public",
baseURL: "/",
maxAge: 60 * 60 * 24 * 365,
},
],
externals: {
// Keep native module out of the server bundle; load it from node_modules at runtime.
external: ["canvas"],
},
typescript: {
strict: true,
},
});