Node compatibility just got a lot better in Deno

Поделиться
HTML-код
  • Опубликовано: 31 дек 2024

Комментарии • 35

  • @Supabase
    @Supabase  Год назад +10

    Keep up with everything we are launching here: supabase.com/launch-week?

    • @codewithtae6637
      @codewithtae6637 3 месяца назад

      So I don't need to host my node app? Just deploy it to edge functions?

  • @dshukertjr
    @dshukertjr Год назад +7

    NPM support on Supabase Edge functions has been the most requested feature! So excited that it has landed!

  • @theseedship6147
    @theseedship6147 Год назад +9

    Great video, I'd gladly watch a full Deno one ! Thanks !

    • @JonMeyers
      @JonMeyers Год назад +1

      Glad you enjoyed it! Will add it to the list! 🚀

  • @thorwebdev
    @thorwebdev Год назад +5

    I love this. Don’t even need to run npm install and still get the full power. Incredible work!

  • @ekimbangola
    @ekimbangola Год назад +7

    How the web has grown. Running Node in Deno, running Apache in Ngnix, running IIS in TomCat or even Supabase in Firebase. So cool so easy.

    • @JonMeyers
      @JonMeyers Год назад +1

      It's all turtles, all the way down! 🐢

  • @rodrigomansuelinunes1285
    @rodrigomansuelinunes1285 Год назад +4

    Deno is awesome!

  • @ThingEngineer
    @ThingEngineer Год назад +11

    So easy now! And 10 minutes early. 🎉

    • @JonMeyers
      @JonMeyers Год назад +1

      Yeah, the Node compatibility is huge! 🚀

  • @trentguillory9808
    @trentguillory9808 Год назад +5

    It'd be great to see a performance breakdown comparing a standard node app (like you started with), a Deno-based app hosted on edge functions, and a node app converted to deno hosted on edge functions.
    I couldn't help but notice the vanilla, non-edge function responded in under 200ms locally, while the Deno-converted, edge function-hosted updated version had about 3x the response time.
    I know localhost response times don't necessarily have much bearing on production numbers, but I can't help but wonder... the difference between an API that responds in 200ms vs 600ms is huge.

    • @Pictor13
      @Pictor13 Год назад +2

      That's not a Supabase thing; as you already said: one is just a local runtime, while the other is a full remote platform (deno runtime + edge wrapper + api-gateway + the internet + your connection).
      You want to compare locally "node yourscript.js" VS "deno yourscript.js"; that's the only thing that would make sense to benchmark (I suppose Deno will win hands down here). If you really want to (imho, unfairly) compare local with serverless you should first ensure that you are comparing against hot-start and not cold-start; because probably the 3x reasons time is mostly network latency.
      Also, ask yourself if your apps performance really matter the comparison and if there are other bottlenecks that are showing you down rather than the runtime (like DB or filesystem requests).

  • @ShaneTheKing
    @ShaneTheKing Год назад

    I really like how you pointed out edge cases and then handled them. Solid thinking ahead for this video, and a great lesson as always. Thank you!

  • @HijabiCoder
    @HijabiCoder Год назад +7

    This is very useful 💪🏽🙏🏽
    And the vid is supa well done 🆇

    • @JonMeyers
      @JonMeyers Год назад +2

      Thanks! Glad you enjoyed it! 🙌

  • @wheeldwell
    @wheeldwell 11 месяцев назад

    Wonderful update, makes developing for Supabase way more powerful. Kudos!

  • @marlondietrich6287
    @marlondietrich6287 15 дней назад

    Does this still need to be done like this or are there simpler options to use npm packages in deno now?

  • @schlep
    @schlep Год назад +1

    Looking forward to using npm packages with my next application 🐉💻

  • @codewithtae6637
    @codewithtae6637 3 месяца назад

    So I don't need to host my node app? Just deploy it to edge functions?

  • @personal1872
    @personal1872 7 месяцев назад

    can we use Prisma with Supabase Edge function ?

  • @oaisjdfojisdffe
    @oaisjdfojisdffe Месяц назад

    So I have to manually update import_map.json if I want to use npm package? Or is there a better way?

  • @Mohannadhamdy
    @Mohannadhamdy 10 месяцев назад

    this is crazy good! well done guys

  • @cjpettigrew
    @cjpettigrew Год назад +1

    How would this work with private npm repos?

    • @Pictor13
      @Pictor13 Год назад +2

      I think that's a question for the guys from Deno, not from Supabase.

  • @TheLarynx
    @TheLarynx Год назад

    how would one do this with a vercel/nextjs setup with supabase

    • @ollierkul
      @ollierkul 11 месяцев назад

      pretty sure nextjs does not work with Deno because it depends on certain Node.js APIs or packages that are not supported (yet). They are working on supporting them though.

  • @andrueanderson8637
    @andrueanderson8637 Год назад +1

    How does one run Node, a JavaScript runtime, in Deno, also a JavaScript runtime?

    • @Pictor13
      @Pictor13 Год назад +1

      Probably a wrapper to map Node calls to Deno core. Or they simply rewrote (copy paste & adapt) the Node core to link to Deno functionality.

    • @andrueanderson8637
      @andrueanderson8637 Год назад

      @@Pictor13 the functions that make up Node's API are separate and distinct from Node itself. "Node" refers to the runtime, not the API. "Running Node in Deno" is a nonsense phrase at best..at worst it indicates a lack of understanding in the author which would indicate a lack of due diligence on Deno's part in vetting their social media manager

    • @JonMeyers
      @JonMeyers Год назад +1

      @@andrueanderson8637 "Write code that could be executed by a Node runtime in a Deno runtime" did not fit in the thumbnail or title 😆

    • @andrueanderson8637
      @andrueanderson8637 Год назад +1

      @@JonMeyers That would actually be funny if there weren't any obvious alternatives. "Support for the Node API in Deno just got a whole lot better!"

  • @awalias
    @awalias Год назад +1

    this was the missing piece of the puzzle!

  • @theGoldyMan
    @theGoldyMan 11 месяцев назад +1

    Isn't the support for npm packages coming from Deno, and more precisely newer Deno version. It's not your achievement. Your achievement is finally updating the Deno version. Now about that Deno version. What is actually the version of Deno. Where we can check that and please don't point me to logs and discord. How do I know what version I have to put for std and supabase-js.

  • @supa_olirice
    @supa_olirice Год назад

    🔥🎆