diff --git a/nitro.config.ts b/nitro.config.ts index 29f6b56..ea52bd1 100644 --- a/nitro.config.ts +++ b/nitro.config.ts @@ -1,9 +1,13 @@ import { join } from "path"; +import pkg from "./package.json"; //https://nitro.unjs.io/config export default defineNitroConfig({ noPublicDir: true, srcDir: "./src", + runtimeConfig: { + version: pkg.version, + }, alias: { "@": join(__dirname, "src") } diff --git a/package.json b/package.json index 1f38a9d..23852a9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "simple-proxy", "private": true, - "version": "2.1.1", + "version": "2.1.2", "scripts": { "prepare": "nitropack prepare", "dev": "nitropack dev", diff --git a/src/routes/index.ts b/src/routes/index.ts index 3f7e059..c2860c5 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -21,7 +21,9 @@ export default defineEventHandler(async (event) => { event, status: 200, data: { - message: 'Proxy is working as expected', + message: `Proxy is working as expected (v${ + useRuntimeConfig(event).version + })`, }, });