Make your own mock API (super simple)
Vložit
- čas přidán 11. 09. 2024
- ⭐ Sign up for my Full Stack Developer Course: www.codewithan...
Hello everyone! In this weeks video I show you how to make your own RESTful API and deploy it onto the internet in just a few easy steps. This is thanks to the github.com/typ... package. Where you can get a mock REST API with zero coding in less than 30 seconds.
For those of you who would like to add a burger, please make a pull request here, following the same format as discussed: github.com/kub...
For those of you wishing to check it out live visit here: my-burger-api....
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:
fetch('my-burger-api....) etc....
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!
Twitter: / ania_kubow
CZcams: / aniakubow
Instagram: / aniakubow
#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:
fetch('my-burger-api.herokuapp.com/burgers/0')
.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.
how would we use the deployed api in the video with postgres db heroku. I have a web app that is calling to api. This api is like the one in the video, so it's getting modified, but after a while the data is lost. Thanks.
Living Waters youtube channel
You so beautiful
interesting but a bit confusing as you are using another site. It's like you are checking postman to see your array. I'd love to see an actual site.
@@alluringgrace413 after 24 hours heroku clears storage, check digital ocean for persistent storage...
"make sure everything's in line so it's easier to read". YES. EXACTLY. THANK YOU.
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.
You are so welcome Thelma! Glad to be part of your coding journey :)
It's been a while since I've watched it but it's growing.
Thank you for watching
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.
Thank you so much that is super kind of you to say!
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!
Amazing!!! I really appreciate you taking the time to leave some kind words. You rock 👊😃
same here dude
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!
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
You are more than Welcome Dave! Thank YOU for taking the time out to write such a lovely comment 😄
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
i just found this video, haven't watched it yet but i already love it, love your beautiful and kind soul, thank youuuuuuuuuuu
i like burgas
🍔
I bet you do en.wikipedia.org/wiki/Burgas
@@aniakubow contact me thanks
Inventing Ania 😂
Bagaz
What is this... a super-model... programmer?
SUBSCRIBED!!
aww shucks haha
Ania, you are the CZcams 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!
Yo, Ania really is the dragon queen of coding 😂.
Hey Ania, this is awesome - I'm following it to create my first API. I am 100% newbie so great easy instructions.
Cool, I just completed a course on Postman and really looking forward to this project 🙏🏻🌟
yesss i hope its useful :)
Good morning Ania, thanks for posting. My internet connection seems to be a little flakey this morning, I'll watch this later.
so strange - a few people said the video was being flakey in the premiere! Thanks for watching anyway :)
Just discovered your channel, you are brilliant! Watching your content makes the whole backend dev thing seem doable! Keep up the good work!!
Cool! I made my own stock-api as an open source too. Thanks for great contents on YT!
Very cool! Thanks for watching :)
Coool! I'll soon create an API with pictures for a photograph's site connected with Dropbox... First steps easier with your clear explanations 👍🤩👍
yes! Share it with us when you are done :)
@@aniakubow work not started yet but in progress with the design 😁 Thanks Ania 🌟
Oops waiting for this series, thanks anie🙏🙏❤️❤️❤️❤️
Anytime Rahul :)
Looove this simple explanation! I know some good burgers, so I'll create a pull request soon.
yes please do!
@@aniakubow do they have to be in the UK or are we going international?
@@emmahindmarch5754 ooooohhhh were going international with this!!!! haha LETS GO WILD
@@aniakubow awesome! Expect some French ones then 🇫🇷
You rock - enjoyed that and did not put me to sleep like other vidz....im making a burger to celebrate.
Oh wow,i really wanted an api video.Thank you .
You are most welcome
At first i was like ... buggers ? while reading the comments ... then i scrolled up! Also you are amazing! Thanks for the content!
hahahaa I know I never realised I can't say the word burger 😂🍔! Thanks for watching Regis :)
Missed the live event but just caught up... great video as always Ania, your style of teaching is amazing looking forward to the next video
You are so welcome! Thanks so much for the kind words!
I really enjoy your video's! I like how you talk us through how you think and work, very helpful :)
Thanks for showing the deployment setup. Always the trickiest part for me
I really love your energy!!! Thanks a lot for this yt channel
"There's no such thing as a perfect wom-" **Ania builds burger API**
Great as always. Be nice to see a video where you add a schema, a way for visitors to submit their burgers, and db validation for submissions. Let's get this API growing!
"United Kingdon" :D hahaha
Great video as always!
Cheers from Arg
Hahaha such a typo - glad I fixed it otherwise it would be driving me crazy
What a wonderful breath of fresh air you are. More vids Please.
+Great tutorial. An interesting extension would be to build a React UI for the API. 🙏
Great suggestion!
Learning about API's now and this video was fun to practice making one and getting a better understanding of how they work.
Thank you for teaching us, from sunny southern California, USA. Cheers mate ;-)
I need some sun! And, you are very welcome :) thanks for watching!
Super useful thanks! How would you connect this API to a Simple Front End? Also, is the Back End NodeJS? Sorry i'm kinda learning this stuff right now ;)
Wow, to chyba pierwszy wartościowy kontent jaki algorytm CZcams wywalił mi na główną :)
Ah dziękuje ślicznie!!! Super to usłyszeć 🥰🤩
@@aniakubow Trafiłem tu tak samo... zostanę na dłużej :) Dzięki za materiał!
thanks i just deleted files and created along with you in the video such a huge help! thanks!
had to pause the video at first I thought you said you had to get the debuggers and the names i was hearing Debuggers until my mind start to process it and to find out is was burgers
haha , yes 🍔, not debuggers sadly!
Worked for me. Missed out the 'node' from 'node server.js' but figured it out by looking at your GH. Thanks!
just wait for your new videos everytime you are such an inspiration
Thanks for watching!!!! It means so much - big love
Love it. Smart choice by going with json api instead of express, sonce would need to add a lot of extra code to get everything in working order, Just one thing, there was a typo just in the start of the video, you first tried installing json-api, but after adding the registry, you installed anothet library called 'json' instead. Cheers!
Thanks so much Bernhard!! I know I saw that after I uploaded 🤦🏼♀️ - nightmare. But hopefully people would have followed the first step and with the correct package, so it shouldn’t cause problems. Happy to have you on my channel 🙌🏻🙌🏻🙌🏻
This was great help for one of my portfolio projects (and ones to follow!). Cheers Ania!
I honestly thought you were saying "bugger"..."where I can find the bugger" etc...burger...I see, it makes sense now.
Without Ania's videos I'd be so lost
Thank you! :) Watching all the way from South Africa.
Yay! Hello from London :)
I wish each they had included thumbnails. Either the restaurant front or the burger it's self.
bugger api, next billion dollar business, all jokes aside nice tutorial.
Such great communication skills 👍🏼
Thanks loads!
Hellooo!! A lot of Burgers here!
yup. :)
mmmm
I use json-server with Ngrok and it work great! Thanks for sharing!
EXACTLY what I was looking for. Thank you!
Ania, you're a gift to the dev community. ❤️ your 🧠 and content. Keep those bugahs coming!
Edit: ❤️ your 👀 too
Ah rob that’s too kind !!!!! Booorgahs all round on me haha
hi Ania Kubów,
your tutorial is great. so can you make a video about building an API step by step with explaining?
Never heard it called baggas before but thanks for the video!
i just love bargars mjam :)
No, it is pronounced buggers!
You're one of my favourites 😍🙌
Thank you, charming Ania ❤
Thank you Ram!
Hi Ania, many thanks for your tuto.
In my case to deploy into Heroku I had to use:
git push heroku HEAD:master
BR.
Thanks for such a good explanation, I came here to see how to create APIs and whether it's possible to make and deploy APIs without using node.js , but there are no shortcuts to success 😅
Love this topic! And keep making videos on how to 'make' stuff!
Thank you! Will do!
Glad I found this channel! Thank you 😊
You probably know there is terminal in vscode. Thanks for making this video!
You’re so welcome !! Thanks for watching 💙
Of course she knows that
very useful video thanks for taking ur time in creating such good content!
Umm, the thing is you have to manually add the data in your database. Like, you could install puppeteer and code a scraper to scrape a website to auto grab some of the data and have it auto save into your director as a json file using node filesystem. Which I have done in the past but, i'm not sure the legallity of scraping website you might need to look in the terms of service of the website you want to scrape to see if its legal ect.
we will support your contribution
Always come for Ania beautiful voice and accent ***
Wow, thank you! :D
Interesting choice of vid thumbnail. I need to go now.
Thanks Ania for the content!
your'e very welcome!
Thanks a lot for this. Exactly what I’m looking for. So helpful. I really appreciate
Love those Burgas!
Thank you Ania for the awesome explanation! keep it up. it seems you have a hobby doing Burgers :p
great stuff but some of us still do use windows so just few references to the windows commands would be great other wise packed full of content thank you
Finally a tutorial done by a WOMAN. We need more women in tech.
yeaaaaa! Did you know only around 9 percent of my audience is female (according to CZcams) - and apparently that is a high percentage according to my Dev CZcams pals!
@@aniakubow you just got another female audience right here! haha love your content and burgers :)
Where can I get that Terminal theme? Looks kinda cool.
To auto Format in vs code the shortcut is Alt + shift + F
Project blowing up
wow, simple and to the point, great tutorial, you got yourself a new subscriber, waiting for your new stuff 😊
I'm learning javascript because of you ❤️😭
Yessss! I’m glad I can persuade you haha
This is sooo sooo cool , thank you for this amazing video , it was very helpful for me
This was so cool video. Thank you very much. 👍💖
You’re very welcome Mohamed!
It's working! Thanks a lot!!! ))))
Love the tutorial, I am an intermediate programmer and this really helped out with my understanding of APIs . Just out of interest, which is better Moochies or Nandos?
I'm so grateful to have found your channel in my final year of engineering! ❤️
I’m grateful to you for watching ! Big love
Hello,
We could even bring a working function to help you understand the working process.
You should be a certified person sounds great.
Good luck
Thank you ma'am
GOD bless you/us all✊👐
excellent workshop
Thanks so much Charles
You're Welcome
Hey Ania, thanks a lot for this superb tutorial! My question is what free alternatives can we use instead Heroku to deploy apps/apis? what would you recommend that is nice and easy? Thanks
Thanks for this.. It's really useful. Got my Rest api working like a charm.. One question. in the last step, you use the "heroku create" to create the api, and then the same command again to create the project. Why do I need both steps, and what is the difference?
I can't take my eyes off your eyes, so amazing!!!
This is working perfectly..Thank you so much for sharing..!!!!
Great stuff, Ania. I'm stuck at showing stuff in the API in nicely formatted HTML. Any help or links or hints for that? -- David
my left ear loved this
Fantastic! Thank you so much.
Awesome tutorial!!!
You are just amazing!!
thank you so much! you're amazing!
Its amazing thanks!!! learnt something new today!
Great video. You have a new subscriber :)
Ania you are the best
Thanks a lot!