mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Add more user serialization
This commit is contained in:
parent
636f2ffff8
commit
416a7186d1
3 changed files with 64 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue