Initial commit

This commit is contained in:
Jesse Wierzbinski 2023-09-10 17:31:08 -10:00
commit 436a79d99f
No known key found for this signature in database
GPG key ID: F9A1E418934E40B0
50 changed files with 870 additions and 0 deletions

16
utils/config.ts Normal file
View file

@ -0,0 +1,16 @@
import data from "../config/config.toml";
export type ConfigType = {
database: {
host: string;
port: number;
username: string;
password: string;
database: string;
}
[ key: string ]: any;
}
export const getConfig = () => {
return data as ConfigType;
}

8
utils/response.ts Normal file
View file

@ -0,0 +1,8 @@
export const jsonResponse = (data: object, status: number = 200) => {
return new Response(JSON.stringify(data), {
headers: {
"Content-Type": "application/json"
},
status,
});
}