Remove testroutes; Update register endpoint; Add Redis lib

This commit is contained in:
Stefan-5422
2022-03-30 12:21:02 +02:00
parent 71e3a3c941
commit 8f9a8ebdea
9 changed files with 366 additions and 6 deletions
+17
View File
@@ -0,0 +1,17 @@
import redis, { createClient } from "redis";
import { promisify } from "util";
function createAsyncClient(client: redis.RedisClientType) {
return {
get: promisify(client.get).bind(client),
set: promisify(client.set).bind(client),
};
}
/*----E-mail verify----*/
const email: redis.RedisClientType = createClient({
url: "redis://localhost:6379",
});
export const emailClient = createAsyncClient(email);