Studio

Hello, i'm testing using drizzle with fastify in a docker and postgres, i complete a request but my studio is running infinitely, i don't know why
import type { Config } from 'drizzle-kit';

export default {
// schema: './src/db/schemas/*.ts',
// out: './src/db/migrations'
driver: 'pg',
dbCredentials: {
host: 'db',
port: 5432,
user: process.env.DB_USER!,
password: process.env.DB_PASSWORD!,
database: process.env.DB_NAME!,
ssl: false
},
verbose: true,
out: './src/db/migrations',
schema: './src/db/schemas.ts'
} satisfies Config;
import type { Config } from 'drizzle-kit';

export default {
// schema: './src/db/schemas/*.ts',
// out: './src/db/migrations'
driver: 'pg',
dbCredentials: {
host: 'db',
port: 5432,
user: process.env.DB_USER!,
password: process.env.DB_PASSWORD!,
database: process.env.DB_NAME!,
ssl: false
},
verbose: true,
out: './src/db/migrations',
schema: './src/db/schemas.ts'
} satisfies Config;
import { drizzle } from 'drizzle-orm/node-postgres';
import { Pool } from 'pg';
import * as schema from '@db/schemas';

const pool = new Pool({
host: 'db',
port: 5432,
user: process.env.DB_USER!,
password: process.env.DB_PASSWORD!,
database: process.env.DB_NAME!,
ssl: false
});

export const db = drizzle(pool, { logger: true, schema });
import { drizzle } from 'drizzle-orm/node-postgres';
import { Pool } from 'pg';
import * as schema from '@db/schemas';

const pool = new Pool({
host: 'db',
port: 5432,
user: process.env.DB_USER!,
password: process.env.DB_PASSWORD!,
database: process.env.DB_NAME!,
ssl: false
});

export const db = drizzle(pool, { logger: true, schema });
5 Replies
Byte
Byte11mo ago
GitHub
[BUG]: Drizzle Studio CORS error · Issue #1857 · drizzle-team/drizz...
What version of drizzle-orm are you using? 0.29.3 What version of drizzle-kit are you using? 0.20.13 Describe the Bug Unable to use drizzle-studio due to CORS error. Visit https://local.drizzle.stu...
mscholz.dev
mscholz.devOP11mo ago
i will try this night, thank you for your response Update, i installed mkcert, i ran mkcert -install but i don't know what to do next I tried to remove cors, to install extensions like "cors unblock" (i'm on firefox/linux) but always cors error
mscholz.dev
mscholz.devOP11mo ago
when i use the port of my api and the host of my api (not in the npm script or it will say that the port is already in use, i have this message, but i already installed the latest version)
No description
mscholz.dev
mscholz.devOP11mo ago
No description
mscholz.dev
mscholz.devOP11mo ago
this is the entrypoint of my api, i don't understand what i do wrong so i send everything i can to be debbuged
No description
Want results from more Discord servers?
Add your server