-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Drizzle Studio with PGlite needs to fetch nitro dev backend, and the url is hardcoded with plain http schema:
Line 30 in 7d6122b
| 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
Launchbutton in Nuxt Devtools Database page. - See error in
nuxt devconsole.
Expected behavior
The following patch work on my machine:
const nitroDevUrl = `${nuxt.options.devServer.https ? 'https' : 'http'}://localhost:${nuxt.options.devServer.port || 3e3}`;Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working