NazCodeland
NazCodeland
Explore posts from servers
CDCloudflare Developers
Created by NazCodeland on 4/6/2024 in #workers-help
storing stateful WebSockets connection
Hey everyone, so, I am just learning that "stateful objects" can not be stored in a Database, like D1 or any other Database. KV won't work because it can only store string values. I'm learning that stateful connections in programming are stored in the memory of the running application.
6 replies
CDCloudflare Developers
Created by NazCodeland on 4/4/2024 in #workers-help
How access 'env' in the WebSockets Template
Hey, I've got a Cloudflare Worker that implements WebSocket connection. The implementation is from: https://github.com/cloudflare/websocket-template I am wondering how can I access the env variable that is usually available to us when we use the
async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
...
async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
...
syntax instead of the one used in the template,
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
8 replies
CDCloudflare Developers
Created by NazCodeland on 4/2/2024 in #workers-help
`wrangler tail` with WebSockets
Is this not true for any incoming Websocket requests? - I have a console log inside of the websocket.addEventListener("message" in the websocket template on Cloudflares Github pages and I've noticed that it doesn't log those live, only when you close the connection do all the logs show up
14 replies
CDCloudflare Developers
Created by NazCodeland on 1/5/2024 in #pages-help
Nodemailer
Hey everyone, I've got a website that deploys to Cloudflare Pages but ever since I've added a form that uses Nodemailer, my deployment is failing. It's because CloudFlare Pages environment doesn't support all Node.js modules. Is there a work around this without using third party email senders?
1 replies
CDCloudflare Developers
Created by NazCodeland on 12/31/2023 in #pages-help
Page address for GitHub Repository not working
Hey everyone, I've created a Cloudflare Page using my Github Repository and was able to build successfully, however, when I go to the link given for the project, saigon.pages.dev it does not work.
30 replies
CDCloudflare Developers
Created by NazCodeland on 7/29/2023 in #workers-help
console.log(request) doesn't show shape of request
Hey everyone, I have a local environment running, wrangler dev In my worker script, I have console.log(request) and in the terminal all I see is
Request {

}
Request {

}
17 replies
CDCloudflare Developers
Created by NazCodeland on 7/23/2023 in #workers-help
unable to access cli in worker editor
9 replies
CDCloudflare Developers
Created by NazCodeland on 7/21/2023 in #workers-help
"Token and remote not found"
10 replies