Describe the bug
Drizzle Studio with PGlite needs to fetch nitro dev backend, and the url is hardcoded with plain http schema:
|
const nitroDevUrl = `http://localhost:${nuxt.options.devServer.port || 3000}` |
which doesn't support https dev server and we will get the following error:
[nuxt:hub] ℹ Launching Drizzle Studio with PGlite...
[nuxt:hub] ERROR Failed to launch Drizzle Studio: fetch failed
at node:internal/deps/undici/undici:13510:13
at async launchDrizzleStudio (node_modules/@nuxthub/core/dist/module.mjs:710:9)
[cause]: other side closed
at Socket.<anonymous> (node:internal/deps/undici/undici:6294:28)
at Socket.emit (node:events:536:35)
at endReadableNT (node:internal/streams/readable:1698:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Steps to reproduce
Steps to reproduce the behavior:
- nuxt.config.ts
export default defineNuxtConfig({
devServer: {
https: {
key: "localhost-key.pem",
cert: "localhost.pem",
},
},
modules: ["@nuxthub/core"],
hub: {
db: "postgresql",
},
});
- Click
Launch button in Nuxt Devtools Database page.
- See error in
nuxt dev console.
Expected behavior
The following patch work on my machine:
const nitroDevUrl = `${nuxt.options.devServer.https ? 'https' : 'http'}://localhost:${nuxt.options.devServer.port || 3e3}`;
Describe the bug
Drizzle Studio with PGlite needs to fetch nitro dev backend, and the url is hardcoded with plain http schema:
core/src/devtools.ts
Line 30 in 7d6122b
which doesn't support https dev server and we will get the following error:
Steps to reproduce
Steps to reproduce the behavior:
Launchbutton in Nuxt Devtools Database page.nuxt devconsole.Expected behavior
The following patch work on my machine: