locohost
Explore posts from serversCDCloudflare Developers
•Created by locohost on 4/20/2024 in #pages-help
I must be missing a bit on CF Pages "functions" folder, it never works for me
pages.dev: https://a37dd34e.lkg-pages-hono.pages.dev
deployment id: a37dd34e-3951-4c09-b03a-0ba7b7eca80c
account id: 97b74a45f478725ddc37f3f1ddc20277
I have a fairly basic CFP project. It's Typescript, Hono, Drizzle, Tailwindcss with Vite and uses CF KV for auth/users/sessions. It's in really good shape and is fully functional but for one part I just can't seem to "wrangle" 😉
I'd like to move the code that talks to KV and later D1 into "functions". I mean I can certainly create a "repos" folder and put the db code in files there, but I thought it would be fun to try functions in CFP.
I added a "functions" folder in project root. I put the example.ts file from the CF docs. I've tried other files too. So far, functions does nothing for me. No function ever works local or deploys and works.
My build and deploy scripts in
package.json
are...
My vite.config.ts
looks like...
I'm sure there is one magic step I'm not seeing in docs so here I am 🙂7 replies
DTDrizzle Team
•Created by locohost on 1/20/2024 in #help
Node app Typescrip drizzle-orm/libsql works fine in terminal, but errors running in Docker container
I've built a Node Express app with Typescript. I'm using Drizzle and TursoDb for the data stuff. Everything works peachy when I'm running the app in terminal. It also builds (tsc) and then the /dist version runs perfectly great.
However, when I build a Docker container and the app tries to run, I get an error on the drizzle-orm/libsql line in transpiled JS...
This is error when Docker image runs...
Has anyone else experienced this? I'm certain its something dumb on my part. Ofc. Can anyone offer some advice to get this working in the Docker container?
Thank you for any help!
3 replies