Skip to content

Commit

Permalink
allow mysql in prod for a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
oscartbeaumont committed Oct 28, 2024
1 parent d42d5ae commit ada24a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export const db = withEnv(() => {
const client = new Client({
url: env.DATABASE_URL,
fetch: async (input, init) => {
if (import.meta.env.DEV) {
// if (import.meta.env.DEV) {
if (env.DATABASE_URL.startsWith("mysql://")) {
if (!fetchHandler)
fetchHandler = (
await import("@mattrax/mysql-planetscale")
).createFetchHandler(env.DATABASE_URL);
}
}
// }

// Cloudflare Workers doesn't support like the `cache` property
// biome-ignore lint/performance/noDelete:
Expand Down

0 comments on commit ada24a8

Please sign in to comment.