mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 18:30:39 +09:00
add app version label
This commit is contained in:
parent
bcce5b7ec2
commit
02bf0dd862
5 changed files with 22 additions and 2 deletions
10
server/src/version.ts
Normal file
10
server/src/version.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { createRequire } from "node:module";
|
||||
|
||||
type PackageJson = {
|
||||
version?: string;
|
||||
};
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
const pkg = require("../package.json") as PackageJson;
|
||||
|
||||
export const serverVersion = pkg.version ?? "0.0.0";
|
||||
Loading…
Add table
Add a link
Reference in a new issue