sten
Explore posts from serversDTDrizzle Team
•Created by sten on 8/7/2024 in #help
[solved] The server does not support SSL connections
I am running Drizzle with Postgres in a devcontainer using Docker WSL 2.
In my db file:
In my config:
Despite this, I keep getting the SSL issue.
I am starting my container like this:
CMD ["sh", "-c", "npm run generate && npm run migrate && npm run dev"]
Where the commands correspond to
I am calling generate and migrate to assure that if someone would run this on their system, they've would have the correct tables setup.
UPDATE:
So I removed ssl: { rejectUnauthorized: false }
and it worked, however, upon connecting to the db
docker exec -it postgres_db psql -U postgres -d postgres
, it reveals that I don't have any relations
UPDATE 2:
I noticed that my generate command was wrong
I was using drizzle-kit up
, must have mixed them up somehow1 replies
CDCloudflare Developers
•Created by sten on 2/5/2024 in #pages-help
How to serve javascript files (as third party lib)
I am currently implementing a widget to be embedded as a third party library on websites.
I am developing it with Vanilla Svelte and rollup.js.
This is my rollup config.
Question: how can I serve the bundle.min.js through Cloudflare as a CDN? I am assuming it should be possible with Pages Direct Upload?
Idea is to be able to include the script like this later on:
Would be awesome if someone could point me in the right direction
3 replies
DTDrizzle Team
•Created by sten on 12/30/2023 in #help
Limitation in Drizzle? findMany does not work the same as an innerjoin, is it possible?
So I want to get all posts with supporters with a specific user_id.
Q1 gives me that but I'd like to do it with Q2 but Q2 gives me all posts instead of just the ones that the user_id is supporting.
UPDATE
I went this Q3 which works fine.
6 replies
CDCloudflare Developers
•Created by sten on 12/23/2023 in #pages-help
Deploying with cloudflare/pages-action but cannot locate sveltekit build directory
I am currently setting up a build script with https://github.com/cloudflare/pages-action
I am using @sveltejs/adapter-cloudflare as my adapter as well which says the build directory is .sveltekit/cloudflare. However, github actions cannot find that directory.
Docs here says:
https://developers.cloudflare.com/pages/framework-guides/deploy-a-svelte-site/
@sveltejs/adapter-static Only produces client-side static assets (no server-side rendering) and is compatible with Cloudflare Pages. Review the official SvelteKit documentation for instructions on how to set up the adapter. Keep in mind that if you decide to use this adapter, the build directory, instead of .svelte-kit/cloudflare, becomes build. You must also configure your Cloudflare Pages application’s build directory accordingly.Which means .sveltekit/cloudflare should be correct.
6 replies
CDCloudflare Developers
•Created by sten on 11/30/2023 in #pages-help
Build error when using adapter-cloudflare-workers
I am currently trying to deploy a sveltekit website with Cloudflare workers using Cloudflare KV.
I've followed this guide https://kit.svelte.dev/docs/adapter-cloudflare-workers
I tried building with @sveltejs/adapter-cloudflare:2.3.3 and that works fine, however event.platform.env does not contain Cloudflare KV, even though the .toml file is specified along with the app.d.ts
Anyone have any clue?
3 replies
CDCloudflare Developers
•Created by sten on 11/29/2023 in #workers-help
Workers not logging objects
Tried to log an exception that was thrown but all it logged was:
How can we debug better in workers?
By using
JSON.stringifiy
it printed out empty object "{}",4 replies
CDCloudflare Developers
•Created by sten on 10/5/2023 in #workers-help
How do you write to Cloudflare KV when developing locally with wrangler dev?
I remember that you could write directly to Cloudflare KV's namespace when running wrangler dev locally.
This is what my wrangler.toml looks like.
I am currently running by calling
wrangler dev
.
I have logged in with wrangler. It was a while ago since I did this, maybe an update have come or so.
Right now it writes to local cache at .wrangler/kv
10 replies