Make your own mock API (super simple)

preview_player
Показать описание


A lot of you are wondering if you can interact with this database. Yes you can. You can make GET, POST, PUT, DELETE etc requests to it. You can even get an individual burger. For example if I want to get the Tribute Burger, which has an ID of 0, I would write:

Please try adding a burger to the database, deleting a burger, it's up to you. Give it a go in your console logs.

If you did like this video, please hit the Like and Subscribe button so I know to make more!

#burgerAPI
Рекомендации по теме
Комментарии
Автор

A lot of you are wondering if you can interact with this data. Yes you can. You can make GET, POST, PUT, DELETE etc requests to it. You can even get an individual burger. For example if I want to get the Tribute Burger, which has an ID of 0, I would write:

.then(response => response.json())
.then(data => console.log(data));

Please try adding a burger to the database, deleting a burger, it's up to you. Give it a go in your console logs. :)

I would say this is for project use ONLY, as your POST, PUT and DELETE requests will not be 'stored' as we don't have a database.

aniakubow
Автор

"make sure everything's in line so it's easier to read". YES. EXACTLY. THANK YOU.

liebranca
Автор

I learn by doing things really quickly to completion which gets me comfortable with going back and learning all the details. For that purpose this tutorial was perfect, thank you so much.

thelma
Автор

Ania, thank you so much again. I've been learning so many things from you already and you make it so much fun to learn. And plus, you are teaching all these details, that are very helpful for self-learners like me. I have to pause and rewind your videos every few seconds cuz they are full of useful information.
Learning Javascript by making simple games is super fun with you and the API video comes in so handy now, since I am trying to make a website and an iOS web for learning German and I've just learned how to use APIs making a Pokedex on several platforms LOL
I appreciate your efforts in constantly providing us with new content. Being a developer and cutting YT videos at the same time you probably don't have much spare time.

쎄쌤독일어
Автор

Thanks for the tutorial, at first I wondered why you didn't set up routes using express or using http and send the json response data, but on researching about json-server got to know how quick and easy it is to set up an API this way.
Been following your videos, great work, expecting more cool react, vanilla js stuff like these!

lxxmi_
Автор

It's been a while since I've watched it but it's growing.

rusa
Автор

This is so cool!! I'm learning React right now and I can't wait to try this to make some mocks for testing. Looking forward to seeing what else your channel has to offer. Thanks so much!

chiwhitesox
Автор

This is fantastic and exactly what i have been after so i can build a few apps prior to sinking deep into full back end. Now to accessing this data in my projects! Thank you so much Ania

daveperry
Автор

i just found this video, haven't watched it yet but i already love it, love your beautiful and kind soul, thank

kennedyfreitas
Автор

yaa that's amazing thank u sooo much!! after a few days of struggle, i was able to solve it thanks to you. i'm so happy <3 I hope you will be more happy when you see this comment💙

gizemcoskun
Автор

Hey Ania, this is awesome - I'm following it to create my first API. I am 100% newbie so great easy instructions.

pascalbenn
Автор

Yo, Ania really is the dragon queen of coding 😂.

Liphted
Автор

Ania, you are the YouTube Code Queen. Keep doing these. Great stuff! And if you ever feel bored and would like a cool, challenging project that will help a lot of people, shoot me a note. Let's talk. Cheers!

donnywb
Автор

What is this... a super-model... programmer?
SUBSCRIBED!!

getfree
Автор

Just discovered your channel, you are brilliant! Watching your content makes the whole backend dev thing seem doable! Keep up the good work!!

ronn
Автор

Cool! I made my own stock-api as an open source too. Thanks for great contents on YT!

idevbrandon
Автор

Good morning Ania, thanks for posting. My internet connection seems to be a little flakey this morning, I'll watch this later.

onestepwebdev
Автор

You rock - enjoyed that and did not put me to sleep like other vidz....im making a burger to celebrate.

v-leo
Автор

Cool, I just completed a course on Postman and really looking forward to this project 🙏🏻🌟

techlead...
Автор

Thanks for showing the deployment setup. Always the trickiest part for me

baileysimrell