Medim
Medim
Explore posts from servers
NNuxt
Created by Medim on 5/7/2024 in #❓・help
Encoding a bit off on createError?
No description
38 replies
NNuxt
Created by Medim on 5/1/2024 in #❓・help
Use prisma globally in api routes
I have a question, is it possible to use the prisma client globally without having to import it everytime? I'm using Prisma + Turso so there's a bit more than just two lines of code to use the prisma client so adding it to every api file is a bit tiring, is there a way to make it available as a util/helper globally? what is the best way to do it?
import { PrismaClient } from "@prisma/client"
const libsql = createClient({
url: `${tursoDatabaseUrl}`,
authToken: `${tursoAuthToken}`,
})

const adapter = new PrismaLibSQL(libsql)
const prisma = new PrismaClient({ adapter })
import { PrismaClient } from "@prisma/client"
const libsql = createClient({
url: `${tursoDatabaseUrl}`,
authToken: `${tursoAuthToken}`,
})

const adapter = new PrismaLibSQL(libsql)
const prisma = new PrismaClient({ adapter })
4 replies
NNuxt
Created by Medim on 4/12/2024 in #❓・help
Using a custom font results in a large blank space beneath placeholders
No description
2 replies
NNuxt
Created by Medim on 4/11/2024 in #❓・help
How can I setup this font using nuxt/fonts
No description
8 replies
NNuxt
Created by Medim on 4/6/2024 in #❓・help
Nuxtr always fails to update dependencies
If I use Nuxtr to update a dependency, it will fail. But If I click on "Install Manually" it goes through without a problem, what could it be? I'm using Yarn 4.0 and its specified on package.json
1 replies
NNuxt
Created by Medim on 2/20/2024 in #❓・help
Can't find auto import in slug route
No description
12 replies
NNuxt
Created by Medim on 12/9/2022 in #❓・help
When to use composables
quick question, when to use composables? In my project im creating an axios instance in a composable, is it correct?
1 replies
NNuxt
Created by Medim on 12/2/2022 in #❓・help
Nuxt 3 not importing component on subfolder
No description
3 replies
NNuxt
Created by Medim on 12/1/2022 in #❓・help
CSS not importing on vuetify plugin.
No description
4 replies