show qr code in share link and add version to footer

This commit is contained in:
Milo Schwartz 2024-12-24 12:06:13 -05:00
parent 9e50a580a5
commit ccc2e3358c
No known key found for this signature in database
8 changed files with 104 additions and 40 deletions

View file

@ -132,6 +132,17 @@ if (!parsedConfig.success) {
throw new Error(`Invalid configuration file: ${errors}`);
}
const packageJsonPath = path.join(__DIRNAME, "..", "package.json");
let packageJson: any;
if (fs.existsSync && fs.existsSync(packageJsonPath)) {
const packageJsonContent = fs.readFileSync(packageJsonPath, "utf8");
packageJson = JSON.parse(packageJsonContent);
if (packageJson.version) {
process.env.APP_VERSION = packageJson.version;
}
}
process.env.NEXT_PORT = parsedConfig.data.server.next_port.toString();
process.env.SERVER_EXTERNAL_PORT =
parsedConfig.data.server.external_port.toString();