Jure
Explore posts from serversBasic nuxt/eslint configuration
@kapa.ai eslint.config.mjs looks exactly like your example... I also expected that this file includes all the necessary configurations for Nuxt... but it I still get an error:
'defineNuxtConfig' is not defined.eslintno-undef
Updating the eslint config like this remove the error:
But I'm not sure if this is the best practice...10 replies
DTDrizzle Team
•Created by Jure on 2/29/2024 in #help
MySQL select().from() type
-----
const users = await db.select().from(models.users).execute()
.execute() fixed the problem 🙂
5 replies
DTDrizzle Team
•Created by Jure on 2/29/2024 in #help
MySQL select().from() type
const users = await db.select().from(models.users).execute()
.execute() fixed the problem 🙂
5 replies
DTDrizzle Team
•Created by Jure on 2/29/2024 in #help
MySQL select().from() type
Not MySqlSelectBase.
5 replies
DTDrizzle Team
•Created by Jure on 2/29/2024 in #help
MySQL select().from() type
I need such "return" type:
[] | Promise<{ row object }>
5 replies
CDCloudflare Developers
•Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
@sylphritz do you mind asking you how do you apply migrations on production D1? From local CLI and wrangler command
npx wrangler d1 migrations apply {dbname}
? I'm trying to apply migrations in the CF Pages "deploy script" like npm run build && npx wrangler d1 migrations apply {dbname}
so migrations would be executed right after deployment / pushing code.27 replies
CDCloudflare Developers
•Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
But the biggest issue is that unless you build the project first(or use a binding proxy), then the dev process won't have access to any bindings.I'm not sure if I understand you correctly... since I'm also a newbie to D1 and the whole development process... but when I run
pages dev --d1=DB -- npm run dev
I have access to D1 binding --d1=DB
and can use local DB over the defined binding.27 replies
CDCloudflare Developers
•Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
True, it already persists in the
.wrangler/
dir but with "random" path to the db.sqlite. For me is convenient to have manually defined path since I'm using Drizzle Studio https://orm.drizzle.team/drizzle-studio/overview - to be able to define path to DB file in the drizzle.config.ts and then browse the DB with simple command npx drizzle-kit studio
.27 replies
CDCloudflare Developers
•Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
It would... isn't that what you want for local development?
27 replies
CDCloudflare Developers
•Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
I'm using this command:
npx wrangler pages dev --local --persist-to=./db.sqlite --d1=DB -- npm run dev
27 replies