Skip to content

Commit

Permalink
Update redis configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
genu committed Feb 5, 2024
1 parent 7cb5b89 commit ce34038
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,23 @@ export default defineNuxtConfig({
concierge: {
redis: {
host: "localhost",
port: 6379,
password: "",
},
},
});
```

**Note**: A redis connetion **is required** for this module to work. A connection test is done during module startup, and an error is raised if a connection cannot be established.
Use the `redis` option to configure the redis connection, or use the `redis` environment variables:

```bash

NUXT_REDIS_HOST='localhost'
NUXT_REDIS_PORT=6379
NUXT_REDIS_PASSWORD=''
```

**Note**: A redis connetion **is required** for this module to work.

## Usage

Expand Down
3 changes: 0 additions & 3 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ export default defineNuxtConfig({
modules: ["../src/module"],
concierge: {
managementUI: true,
redis: {
host: "localhost",
},
},
imports: {
autoImport: false,
Expand Down
6 changes: 3 additions & 3 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export default defineNuxtModule<ModuleOptions>({
boardTitle: "Concierge",
},
redis: {
host: "localhost",
port: 6379,
password: "",
host: process.env.NUXT_REDIS_HOST,
port: Number(process.env.NUXT_REDIS_PORT),
password: process.env.NUXT_REDIS_PASSWORD,
},
queues: [],
managementUI: process.env.NODE_ENV === "development",
Expand Down

0 comments on commit ce34038

Please sign in to comment.