https://discord.cloudflare.com logo
Join DiscordCommunities
Powered by
# workers-discussions
  • r

    rd

    03/18/2023, 12:18 AM
    It loads up the oAUTH url asks me to login then just hangs on the page when i hit "ok" and it throws that error Error: listen EADDRINUSE: address already in use :::8976 at Server.setupListenHandle [as _listen2] (node:net:1469:16) at listenInCluster (node:net:1517:12) at Server.listen (node:net:1605:7) at /Users/rob/dev/node_modules/wrangler/wrangler-dist/cli.js:123605:13 at new Promise ()
  • b

    BearT

    03/18/2023, 12:19 AM
    would it be safe to store api keys in a kv namespace?
  • c

    Cyb3r-Jok3

    03/18/2023, 12:21 AM
    You can store API keys as environment variables or KV depends on how dynamic your keys are
  • b

    BearT

    03/18/2023, 12:23 AM
    wdym environment variables? I tried using dotenv but it doesn't work.
  • c

    Cyb3r-Jok3

    03/18/2023, 12:31 AM
    Oh if you are doing it locally then you use
    .dev.vars
    for secrets https://developers.cloudflare.com/workers/platform/environment-variables/#environment-variables-via-wrangler
  • b

    BearT

    03/18/2023, 12:37 AM
    this was so helpful, tysm
  • a

    aaaaa01010123

    03/18/2023, 5:41 AM
    hello how dose routes work ?
  • a

    aaaaa01010123

    03/18/2023, 5:42 AM
    and why it is not working ?
  • a

    aaaaa01010123

    03/18/2023, 5:45 AM
    or , how do i do this ?
  • h

    HardAtWork

    03/18/2023, 8:27 AM
    Routes for subsubdomains require Advanced Certificate Manager, or a custom domain
  • s

    sirhype

    03/18/2023, 11:54 AM
    Finally finished development on what I was working on, deployed, then got
    The script will never generate a response.
    errors and it looks like my code won't be working tonight Guess this is a problem for tomorrow me
  • a

    aaaaa01010123

    03/18/2023, 3:06 PM
    i have custom domain and it still dons't work, is there any code example , or video tutorial or something more beginner friendly docs ?
  • r

    redux1997

    03/18/2023, 5:25 PM
    @sirhype you are the same person who manages tarik's pro city?
  • s

    sirhype

    03/18/2023, 7:18 PM
    Yep!
  • c

    Chaika

    03/18/2023, 7:31 PM
    You're trying to add a wildcard on a 2nd level or deeper subdomain? i.e
    *.subdomain.yourwebsite.com
    ? If so, that just won't work without ACM (Advanced Certificate Manager) as HardAtWork set. Cloudflare issues you a Universal SSL Cert by default, but that only covers first level subdomains (
    *.yourwebsite.com
    ,
    yourwebsite.com
    ). ACM is a paid addon you can get. Worker Custom Domains do issue Adv. Certs for you, for free, allowing you to put workers on deeper subdomains, but they do not support wildcards
  • c

    Crazy Rabbit

    03/18/2023, 9:17 PM
    is there a way to export default hono and also set up scheduler?
  • h

    HardAtWork

    03/18/2023, 9:21 PM
    Copy code
    ts
    export default <ExportedHandler<Environment>> {
        fetch: honoApp.fetch,
        async scheduled(event, env, ctx) {
            // …
        }
    };
  • n

    nikitasius

    03/18/2023, 9:22 PM
    hi folks, are examples from https://developers.cloudflare.com/r2/api/workers/workers-multipart-usage/ are still working?
  • n

    nikitasius

    03/18/2023, 9:23 PM
    i simply made
    index.js
    , ran
    wrangler publish
    got errors, ran
    wrangler publish index.js
    got syntax errors
  • n

    nikitasius

    03/18/2023, 9:23 PM
    Copy code
    ✘ [ERROR] Expected ";" but found "Env"
    
        index.js:1:10:
          1 │ interface Env {
  • s

    Skye

    03/18/2023, 9:28 PM
    That's typescript, not javascript
  • s

    Skye

    03/18/2023, 9:28 PM
    Use
    index.ts
  • n

    nikitasius

    03/18/2023, 9:29 PM
    thanks, cause CF's docs says: > Add the following code to your project’s index.js file and replace MY_BUCKET with your bucket’s name
  • s

    Skye

    03/18/2023, 9:30 PM
    Ah yeah it does
  • s

    Skye

    03/18/2023, 9:30 PM
    A simple mistake
  • n

    nikitasius

    03/18/2023, 9:31 PM
    nice it worked
  • n

    nikitasius

    03/18/2023, 9:32 PM
    im not a js or ts desv, so directly follow your examples
  • n

    nikitasius

    03/18/2023, 9:32 PM
    🙂
  • n

    nikitasius

    03/18/2023, 9:32 PM
    sadly you don't have java in cf 🙂
  • n

    nikitasius

    03/18/2023, 10:23 PM
    @Skye well, have a question, code from example are working. wanna generate a UUID: lines 2 & 9 and have 500 error in quickedit
1...234623472348...2509Latest