feat(server): add bind address

This commit is contained in:
ItzCrazyKns
2024-05-12 12:15:25 +05:30
parent 828eeb0c77
commit 9816eb1d36
3 changed files with 9 additions and 4 deletions

View File

@ -7,6 +7,7 @@ const configFileName = 'config.toml';
interface Config {
GENERAL: {
PORT: number;
BIND_ADDRESS: string;
SIMILARITY_MEASURE: string;
};
API_KEYS: {
@ -30,6 +31,8 @@ const loadConfig = () =>
export const getPort = () => loadConfig().GENERAL.PORT;
export const getBindAddress = () => loadConfig().GENERAL.BIND_ADDRESS;
export const getSimilarityMeasure = () =>
loadConfig().GENERAL.SIMILARITY_MEASURE;