Jonas
Jonas
Explore posts from servers
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
That was the problem! Thank you! Great videos btw. :).
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
nevermind. the only thing that worked is the vercelKVDriver driver somehow. it looked like it worked, but it just used the fallback...
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
Can be set as query parameter like so: ?family=6
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
Okay: This is the issue: Try setting family: 6; for some reason ioredis defaults to family: 4 and AWS may be using (only) IPv6. Note I had the same issue on fly.io.
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
Seems to be an issue with ioredis and upstash. I used upstash with "redis" and a connection url in the past which worked fine. I might have to use it with the parameters host, port etc. instead.
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
This is what I get now: Okay, I will try to create a new database...
ERROR [ioredis] Unhandled error event: Error: getaddrinfo EAI_FAIL redis://default:[email protected]:6379
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)
at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)
ERROR [ioredis] Unhandled error event: Error: getaddrinfo EAI_FAIL redis://default:[email protected]:6379
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)
at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
It just times out.
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
I don't think I want to. I just need that one base, which I called "db".
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
I only use it in the server routes
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
Is this not sufficient?
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
and I have to use that? What about?
storage: {
db: {
driver: 'redis',
url: process.env.TEMPORARY_STORAGE_CONNECTION_STRING
}
},
// Development
devStorage: {
db: {
driver: 'redis',
url: process.env.TEMPORARY_STORAGE_CONNECTION_STRING
/* driver: 'fs',
base: './data/db' */
}
}
storage: {
db: {
driver: 'redis',
url: process.env.TEMPORARY_STORAGE_CONNECTION_STRING
}
},
// Development
devStorage: {
db: {
driver: 'redis',
url: process.env.TEMPORARY_STORAGE_CONNECTION_STRING
/* driver: 'fs',
base: './data/db' */
}
}
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
Yeah, that was stupid... Put it in the nuxt plugin folder, instead of the nitro one. But could you help me with the unstorage composable. I don't get how to properly configure it.
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
my bad...
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
I know. But it isn't. defineNuxtPlugin works fine
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
@kapa.ai Module '"nitropack"' has no exported member 'defineNitroPlugin'.
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
@kapa.ai doesn't work anyway. I get defineNitroPlugin is not defined...
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
@kapa.ai do i need this?
import redisDriver from 'unstorage/drivers/redis'

export default defineNitroPlugin(() => {
const storage = useStorage()

const driver = redisDriver({
base: 'db',
host: useRuntimeConfig().temporaryStorageConnectionString
})

storage.mount('db', driver)
})
import redisDriver from 'unstorage/drivers/redis'

export default defineNitroPlugin(() => {
const storage = useStorage()

const driver = redisDriver({
base: 'db',
host: useRuntimeConfig().temporaryStorageConnectionString
})

storage.mount('db', driver)
})
103 replies
NNuxt
Created by Jonas on 11/1/2024 in #❓・help
How do I specify redis kv storage for production?
xxx
103 replies