Compare commits

...

2 Commits

Author SHA1 Message Date
omaroughriss
a264e76776 Use env variables for url config
All checks were successful
Build and Push to Registry / build-and-push (push) Successful in 2m5s
2025-09-10 17:28:23 +02:00
omaroughriss
1418f54ece Add dotenv dep 2025-09-10 17:27:59 +02:00
3 changed files with 25 additions and 7 deletions

20
package-lock.json generated
View File

@ -15,6 +15,7 @@
"@vitejs/plugin-react": "^4.3.1", "@vitejs/plugin-react": "^4.3.1",
"@vitejs/plugin-vue": "^5.0.5", "@vitejs/plugin-vue": "^5.0.5",
"axios": "^1.7.8", "axios": "^1.7.8",
"dotenv": "^17.2.2",
"html5-qrcode": "^2.3.8", "html5-qrcode": "^2.3.8",
"jose": "^6.0.11", "jose": "^6.0.11",
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",
@ -2846,9 +2847,10 @@
} }
}, },
"node_modules/dotenv": { "node_modules/dotenv": {
"version": "16.4.5", "version": "17.2.2",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.2.tgz",
"integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "integrity": "sha512-Sf2LSQP+bOlhKWWyhFsn0UsfdK/kCWRv1iuA2gXAwt3dyNabr6QSj00I2V10pidqz69soatm9ZwZvpQMTIOd5Q==",
"license": "BSD-2-Clause",
"engines": { "engines": {
"node": ">=12" "node": ">=12"
}, },
@ -6633,6 +6635,18 @@
"vite": ">=2.0.0" "vite": ">=2.0.0"
} }
}, },
"node_modules/vite-plugin-html/node_modules/dotenv": {
"version": "16.6.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
"integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/vite-plugin-static-copy": { "node_modules/vite-plugin-static-copy": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/vite-plugin-static-copy/-/vite-plugin-static-copy-1.0.6.tgz", "resolved": "https://registry.npmjs.org/vite-plugin-static-copy/-/vite-plugin-static-copy-1.0.6.tgz",

View File

@ -36,6 +36,7 @@
"@vitejs/plugin-react": "^4.3.1", "@vitejs/plugin-react": "^4.3.1",
"@vitejs/plugin-vue": "^5.0.5", "@vitejs/plugin-vue": "^5.0.5",
"axios": "^1.7.8", "axios": "^1.7.8",
"dotenv": "^17.2.2",
"html5-qrcode": "^2.3.8", "html5-qrcode": "^2.3.8",
"jose": "^6.0.11", "jose": "^6.0.11",
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",

View File

@ -7,13 +7,16 @@ import Database from './database.service';
import { navigate } from '../router'; import { navigate } from '../router';
import { storeData, retrieveData, testData } from './storage.service'; import { storeData, retrieveData, testData } from './storage.service';
import { BackUp } from '~/models/backup.model'; import { BackUp } from '~/models/backup.model';
import dotenv from 'dotenv';
dotenv.config();
export const U32_MAX = 4294967295; export const U32_MAX = 4294967295;
const BASEURL = `http://localhost`; const BASEURL = process.env.BASEURL || `http://localhost`;
const BOOTSTRAPURL = [`${BASEURL}:8090`]; const BOOTSTRAPURL = [process.env.BOOTSTRAPURL || `${BASEURL}:8090`];
const STORAGEURL = `${BASEURL}:8081` const STORAGEURL = process.env.STORAGEURL || `${BASEURL}:8081`
const BLINDBITURL = `${BASEURL}:8000` const BLINDBITURL = process.env.BLINDBITURL || `${BASEURL}:8000`
const DEFAULTAMOUNT = 1000n; const DEFAULTAMOUNT = 1000n;
const EMPTY32BYTES = String('').padStart(64, '0'); const EMPTY32BYTES = String('').padStart(64, '0');