Dynamic API Endpoints in Astro

Sdílet
Vložit
  • čas přidán 16. 05. 2024
  • Join the early access for my course! learnastro.dev
    🔗 Key Links 🔗
    - Github: github.com/coding-in-public/a...
    ---------------------------------------
    📹 Related Videos 📹
    - Astro rendering options: • Choosing between SSR, ...
    ---------------------------------------
    ⏲️ Timestamps ⏲️
    0:00 Introduction
    1:18 Dynamic static files
    6:35 React w/ endpoint
    11:15 SSR CRUD functionality
    23:55 Dynamic routing with endpoints
    ---------------------------------------
    🎨 VSCode Theming
    - Font: Cascadia Code: github.com/microsoft/cascadia...
    - Theme: marketplace.visualstudio.com/...
    - Icons: marketplace.visualstudio.com/...
    ---------------------------------------
    🌐 Connect With Me 🌐
    - Website: codinginpublic.dev
    - Blog: chrispennington.blog
    - Twitter: / cpenned
    - Patreon: / coding_in_public
    - Buy Me a Coffee: www.buymeacoffee.com/chrispen...
  • Jak na to + styl

Komentáře • 19

  • @jamesgrubb
    @jamesgrubb Před 2 měsíci +3

    Thanks for this. I was a little confused as to why you mention the public/data.json file but you then go on to use the yaml files as the source of your data.

  • @blokche_dev
    @blokche_dev Před 2 měsíci +1

    Thanks for sharing such valuable content.

  • @hudsonsilvaoliveira5674
    @hudsonsilvaoliveira5674 Před 2 měsíci

    Awesome, as always. Thanks, Chris!

  • @facundoleonel487
    @facundoleonel487 Před 2 měsíci

    Thanks thanks for this video yor content its amazing

  • @xGSTQ
    @xGSTQ Před 2 měsíci

    Ohhh this is nice, I have a use case for this, I have a content collection of locations which contains a lat & lng coordinate. I need the lat & lng of each content collection to create pins and info windows on a Google Map. Boom! Thanks Chris

  • @user-cw4fh5bd2p
    @user-cw4fh5bd2p Před 2 měsíci +1

    Good one 👍, thanks ❤

  • @facundoleonel487
    @facundoleonel487 Před 2 měsíci

    I have a question, for example, if we have a products section on our main page that lists products (without using integrations from other frameworks).
    /products
    Going to that section with a tag pauses the main page until the data on my product page loads. How could I avoid that and give feedback to the user while making the request to my product page API endpoint on the front-end? (skeleton or some loader state).

  • @DisabledCookie
    @DisabledCookie Před 2 měsíci

    i used astrojs to build my portfolio and its always a hassle to update the projects im working on i think i will try this. And is there away to i can set it to fetch Readme as project details?

    • @THEROOT1111
      @THEROOT1111 Před 2 měsíci +1

      Check analogjs it uses astro islands which is angular for all the complicated logic + astro for the SEO gifts it gives, i'm personally doing multiple projects on it.

  • @JesseSlomowitz
    @JesseSlomowitz Před 2 měsíci

    Not sure why this is happening but for the dynamic static file version, the browser will automatically download the JSON instead of displaying it in the browser.

    • @JesseSlomowitz
      @JesseSlomowitz Před 2 měsíci

      It seems that if I don't apply a header of "application/json" in my response, the default is "application/octet-stream" which I assume causes the browser to handle the file by downloading it.

  • @moneyfr
    @moneyfr Před 2 měsíci

    could you try keystatic ?

    • @CodinginPublic
      @CodinginPublic  Před 2 měsíci

      Hopefully soon. I’ve used it in a few projects. Just got too much going on with my course to do a tutorial quite yet on it.

  • @CHEF_ALMERIA
    @CHEF_ALMERIA Před měsícem

    I need to learn how to create membership pages, based on user level of suscription...? Blogs are great, but already have wordpress....

    • @CodinginPublic
      @CodinginPublic  Před 6 dny

      Sounds like you need some auth :) I'd check out Lucia auth. I've been playing around with it and am very impressed! Works well with Astro db, too!

  • @TheCrowdel
    @TheCrowdel Před 2 měsíci

    Why your terminal so beautiful, can i do that in windows ?

    • @hyceate
      @hyceate Před měsícem

      Look up installing zsh and ozsh.