Mads
Explore posts from serversDTDrizzle Team
•Created by Mads on 8/31/2024 in #help
notNull and Unique
Hi
Whenever I use push:db I get that I am about to add a new unique constraint. I then checked and I don’t actually have the unique constraints set.
Am I doing something wrong?
"drizzle-kit": "^0.24.2",
7 replies
Build fails (Nuxt 3)
I have a sort of monorepo that looks like this:
├── base/
│ ├── index.js
│ └── package.json
│ └── ...
└── extended/
├── index.js
└── package.json
└── ...
I am using Nuxt 3 with layers (https://nuxt.com/docs/getting-started/layers)
When I want to build extended, it has references to files in the base directory. e.g:
import foo from './base/xxx.ts'
Locally this works fine. But when deploying on Railway it can't find these references.
How do I define the base directory?
Also when defining a base directory, will it be able to find the references?
How would my nixpacks.toml look?
4 replies
Arrays in query params
Hi!
Is there a simple way to navigate to a link with query params as array?
e.g. this link results in /checkout?product_id=5&equipment_ids=30&equipment_ids=31
Which is fine for me, as I can easily get it working. However, Facebook does not like this and strips away the duplicate equipments_ids. It always keeps the last one.
1 replies
Pre-render page but SSR when query string
Hi
I'd like to build a page where I pre-render a page. Let's call it
/blog
. I then put the following settings in the Nuxt config like this:
This works perfectly and /blog
is now pre-rendered. However, if I do something like this /blog?author=James
it also works well and the page now displays values and it basically becomes a SPA, meaning the content of the page is not pre-rendered.
What i'd like instead of it becoming a SPA, which means when JS is disabled it shows the page equal to /blog
and not /blog?author=James
, is for it to render with SSR.
Thus, when navigating to /blog
should be a pre-rendered page and /blog?author=James
should be a server side rendered page. Is this at all possible?3 replies