feat: new user resource integrating postgresql

This commit is contained in:
Daniel Ledda
2022-07-08 09:31:34 +02:00
parent 3e5c53f9f5
commit ba68f953f0
18 changed files with 281 additions and 121 deletions

View File

@@ -1,6 +1,17 @@
type ServerConfig = {
username: string,
hostname: string,
password: string,
port: number,
}
const config = {
username: Deno.env.get("DB_USER") ?? "postgres",
hostname: Deno.env.get("DB_HOST") ?? "localhost",
password: Deno.env.get("DB_PW") ?? "",
dbPort: Number(Deno.env.get("DB_PORT") ?? 5432),
port: Number(Deno.env.get("PORT") ?? 8080),
};
console.log(`ENV:
db username: ${config.username}
db pass: ******
db port: ${config.dbPort}
server port: ${config.port}
server hostname: ${config.hostname}
`);
export default config;