Kamil
Explore posts from serversCDCloudflare Developers
•Created by Kamil on 3/8/2025 in #workers-help
How to update Worker secrets via REST API (or TS SDK)?
Anyone?
3 replies
CDCloudflare Developers
•Created by ankagar on 3/9/2025 in #workers-help
Next.js + D1 + SSG .. would that work?
Ask on OpenNext Discord server. You won't get much help here.
6 replies
CDCloudflare Developers
•Created by ankagar on 3/9/2025 in #workers-help
Next.js + D1 + SSG .. would that work?
Not sure how you do it. Have you tried OpenNext adapter? It's solution to make Next.js apps running on Workers. It's backed by folks from Cloudflare and it works quite well even though it's not recommended on production yet.
I suggest to try it and ask for help on their Discord server if you face any issues.
6 replies
CDCloudflare Developers
•Created by flutch on 3/8/2025 in #workers-help
Anyway I can lookup username:email format in KV using worker (without list) ?
For your case I'd store data in two tables:
15 replies
CDCloudflare Developers
•Created by flutch on 3/8/2025 in #workers-help
Anyway I can lookup username:email format in KV using worker (without list) ?
If you could precisely determine the
key
- KV would work here great. Unfortunately you can't.
So the issue is you need more flexibility on querying and KV doesn't offer it.
KV has simple data shape: the key and associated value. And the only way to get the value is by knowing the key.
D1 is the SQL database so table shape can be more complex having separate columns for login, email and password so each column can be separately referenced. That way you can query it having only partial information - an email or login.15 replies
CDCloudflare Developers
•Created by flutch on 3/8/2025 in #workers-help
Anyway I can lookup username:email format in KV using worker (without list) ?
That's how I'd aproach it. Mixing KV and D1 together here is overkill imo.
D1 gives you much more flexibility in quering the data.
15 replies
CDCloudflare Developers
•Created by flutch on 3/8/2025 in #workers-help
Anyway I can lookup username:email format in KV using worker (without list) ?
As far as I understand the key must be fully accurate with the one stored in namespace - you cannot query the namespace with only the part of key (only email or login).
In your case I'd store it in D1 with some hashing on the password value for extra security.
Then you can freely query the database with only the login or email.
15 replies
CDCloudflare Developers
•Created by flutch on 3/8/2025 in #workers-help
Anyway I can lookup username:email format in KV using worker (without list) ?
I use cf worker api to login to the accountPlease precise what kind of API you use
15 replies
CDCloudflare Developers
•Created by flutch on 3/8/2025 in #workers-help
Anyway I can lookup username:email format in KV using worker (without list) ?
Can you give some example? I don't get what you'd like to achieve
15 replies
CDCloudflare Developers
•Created by Kamil on 3/8/2025 in #workers-help
How to update Worker secrets via REST API (or TS SDK)?
Leaving my source code below:
3 replies