Add more user serialization

This commit is contained in:
Jesse Wierzbinski 2023-09-10 17:54:14 -10:00
parent 636f2ffff8
commit 416a7186d1
No known key found for this signature in database
GPG key ID: F9A1E418934E40B0
3 changed files with 64 additions and 2 deletions

View file

@ -8,9 +8,19 @@ export interface ConfigType {
password: string;
database: string;
}
http: {
port: number;
base_url: string;
}
[ key: string ]: unknown;
}
export const getConfig = () => {
return data as ConfigType;
}
export const getHost = () => {
const url = new URL(getConfig().http.base_url);
return url.host;
}