NextJS 13: REST APIs Made Simple

Поделиться
HTML-код
  • Опубликовано: 15 окт 2024
  • NextJS 13's new App Router makes building REST APIs super simple with it's dynamic routes and route handling functionality.
    #shorts

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

  • @grugbrain
    @grugbrain Год назад +28

    I use what you taught me at daily work.

  • @dany_beltran
    @dany_beltran Год назад +8

    Awesome! I actually created a helper library when that was not possible, it's called 'next-rest-controller' and another called 'next-api-validation'

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

      Would've been much easier to learn dotnet or django.

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

      and you wouldn't learn technology that will be replaced in the next 2 years when react reinvent itself again
      tbh I was excited about nextjs with pages dir but after they added app dir I understood that this is over engineered and over hyped tech which will most probably die under its own weight in a few years anyway

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

    You make excellent content Jack! Thank you! Love your channel!

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

    Thanks for the quick summary! Will you be posting a more detailed tutorial on how to build a REST API with Next?

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

    Thank you, I was stuck on this post for a few days now, because I didn't find in the documentation how to create a post receiving the request body from the "body".

  • @Dev-Siri
    @Dev-Siri Год назад +7

    Every video without Pokemon is incomplete

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

    im still waiting for it to come out of beta. were going to do a main site redesign and I'm going app directory and tailwind the moment its stable. My dislike of styled components grows by the day since I moved to tailwind for everything else a while ago

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

    This is a lot cleaner. Makes nextjs more like a balanced backend framework. I believe that's their target.

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

    Please 😮 make a detailed video on this

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

    It Is interesting to see how this Framework changes all time

  • @nickruiz8497
    @nickruiz8497 8 месяцев назад

    Just barely getting started with nextjs. Is there a reason why you didn’t create the Pokémon directory inside the api directory?

  • @bonedfps
    @bonedfps Год назад +3

    Hey I was wondering what theme you use? I am using webstorm and hope there already is your vscode theme done for that 😅.

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

      Night Wolf [black]

  • @shawn-skull
    @shawn-skull Год назад +1

    I can't remember any longer the amount of ways there are to use the params/searchparams arguements. Looks like Every version comes with a new approach. 💀

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

    I feel like I am missing something. Where is the information saved? Where is the database? Is this all just saved on runtime or am I misunderstanding this?

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

    Awesome content!
    Just one feedback, for some reason the video bg is being cut off in mobile.

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

      bg? background? like cut off how?

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

      yes, background, sorry. yeah, eg. the import pokemon from "../../pokemon", only display as mport pokemon from "../../pokemo, the i in the beginning and the n" at the end doesn’t show in the screen, this happens in others shorts vídeos too.

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

      @@robertojnior Ah ok. I guess there is a smaller zone of safety for content then the regular 1080x1920. Sigh. 1080x1920 is already tough enough to show code in.

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

    In term of best practice, suggesting that we are using an ORM like Prisma, you should use your query builders from prisma directly in this route.js files right?

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

    wtf i've been learning to do this for the past 6 hours with basic node.js and babel😭

  • @afaqahmad8918
    @afaqahmad8918 8 месяцев назад

    Which vscode theme and fonts are you using?

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

    This will be a great tutorial for crud and image and file rest api creation
    Hope you do it 🙏

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

    Very interesting. Thank you so much. Could you please tell me what theme do you use in you editor?

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

      Night Wolf [black]

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

      @@jherr thank you so much for the answer.

  • @wego-k4811
    @wego-k4811 Год назад

    Short and Simple. What font and theme do you use? Looks so good

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

      JetBrains Mono and Night Wolf [black].

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

    Great for simple stuff

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

    but the bad side of this next js, cant get req.body, example we use form urlencode

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

    My wife has been overhearing my RUclipss over the last year and thinks I’m into Pokémon

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

      Sorry Mrs. Dunning. Maybe I''l do a video that uses something like Ted Lasso episodes. :)

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

      @@jherr lol has to be The Office

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

      @@ToddDunning That would be tough for me. I only watched a little of that show. (I know, I know.)

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

    how to make one file somethingAPI.js that can handle get and post with query params or optional only in one file ?

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

    is this only for the "experimental app folder" version? or works for any app in Next13?
    Thanks

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

      Yes, for the App Router only.

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

      @@jherr thank you

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

    which font and theme, do you use?

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

      Theme is Night Wolf and font is Jetbrains Mono

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

    Any specific reason to use Request instead of NextRequest ?

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

      It's really just the typings, you get more info about the request with NextRequest. But since I'm not using it in almost any case it really doesn't matter.

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

    hello, so i try to redirect POST function how can i do that

  • @afaqahmad-ef4ky
    @afaqahmad-ef4ky Год назад

    What's the name of your vs code font ? And theme

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

    why params only work in second parameter, if use only params without request parameter, it doesn't works

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

    Which theme is used in this video ?

  • @DK-ox7ze
    @DK-ox7ze Год назад

    These are server side routes right?

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

    hi sir, why request.json() not working in me? error code not run

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

    why its not on API folder?

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

    May i ask what font you use? Thank you! ❤

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

      JETBrains Mono.

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

      @@jherr thank you

  • @mtsurov
    @mtsurov Год назад +3

    Your vids are so crisp. Whats the secret sauce ?

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

    I wonder how much easier it is compared to next 12?
    In there you just create a file inside "API" directory and the file itself is an endpoint.

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

      You only get a single function for each api route and you have to figure out for yourself the HTTP verb. It's not a big deal but DX improvements like this are nice.

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

    Whats the color theme please?

  • @MuskanEnglishclasse
    @MuskanEnglishclasse 2 дня назад

    Eski full vidio h kya

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

    What vs code theme is that? 😍

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

    This looks suspiciously like sveltekit :3

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

      Good ideas have a way of getting around. :)

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

    ow we access the get result in component?

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

    whats the vs code theme and font please?? 🙏

  • @JM-st1le
    @JM-st1le Год назад

    What colour theme is that?

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

    Awesome video😮.

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

    Which font is this ?

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

    I like the font. What is it?

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

    What about search params?

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

    Cool, im gonna use nexths to build all my apis😂.

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

      i think their scope is limited to the app.

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

      @@feitan8745 i was joking, i think usibg netxjs is a big overkill for apis

  • @SahilPatel-zn3lo
    @SahilPatel-zn3lo Год назад

    Bro what's your font name?

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

    what vscode theme is that ?

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

      Night Wolf [black]

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

    Why Id is string

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

    Not a fan of having folder structure denote functionality. It feels like a breach of the idea that the functionality is in the code

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

    Make a full video

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

    Sveltekit is leading the way. Wow 😅😅

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

    What the h is that arg list!?

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

    So this ia considered to be simple

  • @kumaramit04-q6c
    @kumaramit04-q6c Год назад

    Why does it look like Laravel?🤨

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

      Does that matter? Good ideas are good ideas.

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

    Why the hell do you want to make an api with a Frontend framework? It's a subpar solution but people who haven't used real backend frameworks won't realize it.