Files
stats/packages/queue/src/connection.ts
Carl-Gerhard Lindesvärd 5afc49b7e4 dashboard: fix toaster
2024-02-12 07:43:33 +01:00

11 lines
260 B
TypeScript

const parse = (connectionString: string) => {
const url = new URL(connectionString);
return {
host: url.hostname,
port: Number(url.port),
password: url.password,
} as const;
};
export const connection = parse(String(process.env.REDIS_URL));