Build an API server with TypeScript

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

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

  • @parlor3115
    @parlor3115 16 дней назад +27

    Day 15 of waiting for NestJS support 🙏

    • @Iammrunkown
      @Iammrunkown 16 дней назад +2

      It should just work. Deno supports Node

    • @avwie132
      @avwie132 15 дней назад +5

      @@Iammrunkownwell it doesn’t and it is because of all the funky reflection things Nest does with its decorators

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

      @@avwie132 Yeah, that could be the case. I recommend reporting the issues

    • @avwie132
      @avwie132 15 дней назад +1

      @@Iammrunkown it isn’t something Deno can solve but what NestJS should solve. And they’ve indicated that they don’t support Deno

    • @parlor3115
      @parlor3115 15 дней назад +2

      The Deno team has a big incentive to push for support or contribute to the NestJS project to enable it. Most of the frameworks available on Deno right now are either express or NextJS clones which means that the developer experience is dogwater. If you want to develop a large-scale backend app, then you'll need better tooling and for TS to be the defacto in your codebase, and ofc you'll need DI. Only NestJS provides DI and all of other features combined on Node, but none for Deno. I mean there's Danet, but I feel that it'll end up like DestJS. So yeah, Ryan if you ever read this, give us NestJS-style DI (constructor / method injection) or Bun will win forever.

  • @carlosdelgado5632
    @carlosdelgado5632 16 дней назад +4

    Nice video, would be nice a video about how to deploy using both options mentioned at the end 🦕

  • @SDAravind
    @SDAravind 16 дней назад +17

    When can we see support for Sveltekit

  • @StephenChapman
    @StephenChapman 16 дней назад +4

    Hi! Do you recommend Hono over a Deno-only implementation of a REST API server? I followed a tutorial the other day that just used Deno's inbuilt server features and it worked a treat. I'm trying to unblur the line of what all I could/should use Deno and its standard library for vs. bringing in other packages/libraries/frameworks! Thanks so much for the tutorial; I'm really enjoying Deno thus far. =)

    • @deno_land
      @deno_land  16 дней назад +1

      It's totally up to you and what your goals are! Each has its pros and cons. Hono is nice because it comes with a bunch of middleware so you can get started easily, but rolling your own is fine too, since you get to minimize your dependencies.

    • @PavelLang
      @PavelLang 16 дней назад +3

      Hono is the best choice today as a router.
      If you have a small API you will not see a difference.
      But when your API grows, you will see great router and middleware; sub-applications performance.
      Just as with everything: Try, learn, earn and joy balance.

    • @GuiseppeZanotta
      @GuiseppeZanotta 16 дней назад

      @@PavelLang Thanks for the recommendation tbh, I was going to roll my own framework but the world could use 1 less Js framework 🤣. As much as I love PHP I have to say Deno, is giving Laravel a run for its money.

  • @rafaelrocha3991
    @rafaelrocha3991 15 дней назад +2

    even though it’s catered more to Deno Deploy, I would really love to have more clarity on how to deploy this exact stack to AWS Lambda - tried the official guide but Hono is unable to get the proxied HTTP request from the API Gateway. Deno is just so suitable for lambdas that I would really love to adopt it for everything lambda related 😃

    • @deno_land
      @deno_land  14 дней назад

      which guide did you try? we will make an updated tutorial soon and want to make sure it covers all of your questions!

  • @profauzan
    @profauzan 12 дней назад

    nice, thank you!

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

    What happens on deno deploy in the free version when the 1M request are reached?

  • @JuicyBenji
    @JuicyBenji 16 дней назад +7

    Am i too tired or is local storage being used on server 😮

    • @coder_one
      @coder_one 16 дней назад +3

      Yes, Deno is trying to be as Web standards compliant as possible. The saddest thing is that someone might actually get the idea to use this (localStorage API) in real backend applications....

    • @DeffQ
      @DeffQ 15 дней назад +1

      I was thinking that somebody is trolling me in this video.

    • @MichaelJiang-fj8kg
      @MichaelJiang-fj8kg 15 дней назад +1

      The localStorage API in Deno stores data in a specific location under the user's home directory:
      - On Windows: %USERPROFILE%\AppData\Local\Deno\localStorage
      - On macOS: ~/Library/Deno/localStorage
      - On Linux: ~/.local/share/deno/localStorage
      It should be noted:
      1. The implementation of localStorage in Deno is based on the file system.
      2. Data is stored in files separately by domain name.
      3. The default maximum storage limit for each domain name is 10MB.
      4. This storage is persistent, and the data still exists after restarting Deno.

  • @bintangnaufal
    @bintangnaufal 11 дней назад

    where did the Cs coming from?????

  • @bytesizedfeed
    @bytesizedfeed 16 дней назад +3

    Ok but does it scale?

    • @deno_land
      @deno_land  16 дней назад +7

      🪜

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

      What do you mean ?
      You can use it, scale it like all api servers no ?

  • @SR-ti6jj
    @SR-ti6jj 14 дней назад

    Yes, let's fracture the JS ecosystem even further

  • @aghileslounis
    @aghileslounis 15 дней назад +2

    Wait a sec, localStorage on the server? What is this? Why is that? What are the use cases?
    I'm so confused

    • @MichaelJiang-fj8kg
      @MichaelJiang-fj8kg 15 дней назад +1

      The localStorage API in Deno stores data in a specific location under the user's home directory:
      - On Windows: %USERPROFILE%\AppData\Local\Deno\localStorage
      - On macOS: ~/Library/Deno/localStorage
      - On Linux: ~/.local/share/deno/localStorage
      It should be noted:
      1. The implementation of localStorage in Deno is based on the file system.
      2. Data is stored in files separately by domain name.
      3. The default maximum storage limit for each domain name is 10MB.
      4. This storage is persistent, and the data still exists after restarting Deno.

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

      @@MichaelJiang-fj8kg thanks for the infos, what are the sue cases ?

    • @deno_land
      @deno_land  14 дней назад +2

      We used localStorage as an example for this tutorial. In the real world, one might do it for prototyping /caching purposes. But for production use case we suggest using a database or other durable persistent data storage.

    • @aghileslounis
      @aghileslounis 14 дней назад

      @@deno_land ok perfect, now that's clear. But I think you should mention that in the docs when an API is not for production but jsut for testing and playing

  • @GuiseppeZanotta
    @GuiseppeZanotta 16 дней назад

    Can somebody explain to me how this works in production. I'm coming from PHP, Nginx setup on FreeBSD.... My understanding is that 1.) I need to have deno installed on my freeBSD server, and running as a background process? 2.) I need to configure deno to serve the hono application? 3.) configure cloudflare DNS ?

    • @Niiju
      @Niiju 15 дней назад +1

      you use the command "deno run ..." which will start the process. Deno isn't a background process that you configure, you use it as a cli command

  • @NoGuSaBooM
    @NoGuSaBooM 16 дней назад +1

    what about graphQL

  • @cloudcoding030
    @cloudcoding030 15 дней назад +2

    make a nestjs tutorial, it's what everyone wants to use not hono.

  • @djasnive
    @djasnive 15 дней назад +1

    LocalStorage 😮. I'm missing something

    • @deno_land
      @deno_land  14 дней назад

      It's web standard!

    • @djasnive
      @djasnive 14 дней назад

      @deno_land yeah, but on the server? It's my first time seeing it 😅
      Sankyouuu