https://discord.cloudflare.com logo
Join Discord
Powered by
# functions
  • r

    ryanjaeb

    03/18/2022, 8:03 PM
    Hi. I'm reading the docs (https://developers.cloudflare.com/pages/platform/functions/#adding-environment-variables-locally) and wondering why
    --binding ENV_NAME=\"ENV_VALUE"
    only has one of the quotes escaped with a backslash. When I set a variable like that and use
    console.log
    in my function, it outputs the value as
    \\ENV_VALUE
    . Is that backslash a typo?
  • l

    lynchy010

    03/19/2022, 6:16 PM
    Hey, I posted a "Show HN" to Hacker News and my functions have been limited. How can I resolve this ASAP?
  • l

    lynchy010

    03/19/2022, 6:16 PM
    https://news.ycombinator.com/item?id=30733339#30735983
  • l

    lynchy010

    03/19/2022, 6:17 PM
    I have submitted the "Functions Limit Increase on Cloudflare Pages" form
  • l

    lynchy010

    03/19/2022, 6:20 PM
    I'd really appreciate any help here 🙏
  • l

    lynchy010

    03/19/2022, 6:32 PM
    I've worked around it for now but it's taking away functionality. Can't I just pay for my usage? :/
  • k

    kian

    03/19/2022, 6:33 PM
    Not whilst Functions are in beta, no - your only hope is waiting for that form to be processed
  • l

    lynchy010

    03/19/2022, 6:47 PM
    Trying to think if I can workaround this using workers
  • i

    Isaac McFadyen | YYZ01

    03/19/2022, 6:57 PM
    Try using Workers Sites.
  • l

    lynchy010

    03/19/2022, 6:58 PM
    I imagine it'll take too long to change how the main site is deployed, plus DNS
  • l

    lynchy010

    03/19/2022, 7:03 PM
    Trying using
    _redirects
    to redirect
    /
    to a worker which redirects back to backofyourhand.com
  • w

    Walshy | Pages

    03/19/2022, 7:03 PM
    @User Workers Sites seems overkill. Just moving the Function to Worker is easy enough
  • w

    Walshy | Pages

    03/19/2022, 7:03 PM
    I mean the function is a worker
  • l

    lynchy010

    03/19/2022, 7:04 PM
    @User can you try https://a436de85.backofyourhand.pages.dev/ please?
  • w

    Walshy | Pages

    03/19/2022, 7:05 PM
    What am I trying about it?
  • i

    Isaac McFadyen | YYZ01

    03/19/2022, 7:05 PM
    Oh yeah duh, I'm using to something like SvelteKit where it's all or nothing.
  • l

    lynchy010

    03/19/2022, 7:05 PM
    @User does it redirect ok and do you see a (not blank) map of a nearby city? e.g.
  • w

    Walshy | Pages

    03/19/2022, 7:06 PM
    It does redirect and yep map works fine
  • w

    Walshy | Pages

    03/19/2022, 7:07 PM
    Though it puts me in London, I'm up north haha
  • i

    Isaac McFadyen | YYZ01

    03/19/2022, 7:07 PM
    WARP?
  • l

    lynchy010

    03/19/2022, 7:07 PM
    ok thanks. On prod, it seems to serving an old deploy intermittently for me (the old one points at a function)
  • w

    Walshy | Pages

    03/19/2022, 7:07 PM
    What do you mean?
  • w

    Walshy | Pages

    03/19/2022, 7:07 PM
    Nope
  • k

    kian

    03/19/2022, 7:07 PM
  • a

    andrew | 1003

    03/19/2022, 7:07 PM
    my map doesnt work either

    https://cdn.andrewnet.net/ShareX/2022/036e4d687d-52b9-4329-9fc7-d57233cd5dfc/chrome_dtgfjF92DE.png▾

  • l

    lynchy010

    03/19/2022, 7:08 PM
    exactly 😢
  • l

    lynchy010

    03/19/2022, 7:08 PM
    I'm triggering another deploy in hopes it helps
  • i

    Isaac McFadyen | YYZ01

    03/19/2022, 7:08 PM
    With SvelteKit you can't use the adapter and a single Function cause it compiles to a
    _worker.js
    , you either have to stay inside the SvelteKit ecosystem (for example using SvelteKit's Endpoints which are basically like Functions) or move the entire project to static and use DIY Functions.
  • i

    Isaac McFadyen | YYZ01

    03/19/2022, 7:08 PM
    So if I wanted to move my site to Workers from Functions for example, I would need to move the whole thing and not just the single Function.
  • i

    Isaac McFadyen | YYZ01

    03/19/2022, 7:09 PM
    I could call an external Worker with fetch etc but then it wouldn't be integrated.
1...102103104...392Latest