Skip to content

Commit

Permalink
Add version identifying on proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjvs committed Jan 6, 2024
1 parent 07a87b4 commit ad0ae4a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions nitro.config.ts
Original file line number Diff line number Diff line change
@@ -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")
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "simple-proxy",
"private": true,
"version": "2.1.1",
"version": "2.1.2",
"scripts": {
"prepare": "nitropack prepare",
"dev": "nitropack dev",
Expand Down
4 changes: 3 additions & 1 deletion src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
})`,
},
});

Expand Down

0 comments on commit ad0ae4a

Please sign in to comment.