fix: parse redis url to get hostname and port (#5502)
* fix: parse redis url to get hostname and port * fix: redis url accepted for connection * chore: add redis url to example env * fix: let users add redis port and host incase redis url is not present * chore: create url from host and port variables * fix: return empty string incase of no config
This commit is contained in:
parent
5840b40d96
commit
1cd7259852
3 changed files with 26 additions and 6 deletions
|
|
@ -11,6 +11,8 @@ import {
|
|||
fetchPageDescriptionBinary,
|
||||
updatePageDescription,
|
||||
} from "@/core/lib/page.js";
|
||||
// config
|
||||
import { getRedisConfig } from "./core/config/redis-config.js";
|
||||
// types
|
||||
import { TDocumentTypes } from "@/core/types/common.js";
|
||||
// plane live lib
|
||||
|
|
@ -46,10 +48,8 @@ const server = Server.configure({
|
|||
}
|
||||
},
|
||||
extensions: [
|
||||
new Redis({
|
||||
host: process.env.REDIS_HOST || "localhost",
|
||||
port: Number(process.env.REDIS_PORT || 6379),
|
||||
}),
|
||||
// @ts-expect-error - redis from hocuspocus is not typed properly
|
||||
new Redis(getRedisConfig()),
|
||||
new Logger(),
|
||||
new Database({
|
||||
fetch: async ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue