regex
regex
Explore posts from servers
TTCTheo's Typesafe Cult
Created by regex on 8/3/2024 in #questions
Uploadthing, image is accessible even after deletion?
Hey, I am removing a file from uploadthing, i can see that the file is removed from the bucket but whenever I try to access it using the url, i can still access it. Is there some other thing that i need to do?
10 replies
DTDrizzle Team
Created by regex on 6/22/2024 in #help
Is this a bad pattern to do? I wanna call my local postgre while developing and use neon in prod.
import { drizzle as drizzleNeon } from "drizzle-orm/neon-http";
import { drizzle as drizzlePostgres } from "drizzle-orm/postgres-js";

import { neon } from "@neondatabase/serverless";
import { config } from "dotenv";
import postgres from "postgres";
import { isProd } from "@/lib/utils";
config({ path: ".env" });

// Dev
const queryClient = postgres(process.env.DEV_DATABASE_URL!);
// Prod
const sql = neon(process.env.PROD_DATABASE_URL!);

export const db = isProd() ? drizzleNeon(sql) : drizzlePostgres(queryClient);
import { drizzle as drizzleNeon } from "drizzle-orm/neon-http";
import { drizzle as drizzlePostgres } from "drizzle-orm/postgres-js";

import { neon } from "@neondatabase/serverless";
import { config } from "dotenv";
import postgres from "postgres";
import { isProd } from "@/lib/utils";
config({ path: ".env" });

// Dev
const queryClient = postgres(process.env.DEV_DATABASE_URL!);
// Prod
const sql = neon(process.env.PROD_DATABASE_URL!);

export const db = isProd() ? drizzleNeon(sql) : drizzlePostgres(queryClient);
Has anyone tried something like this?
2 replies