Make your own mock API (super simple)

Опубликовано: 27 Октябрь 2024
на канале: Code with Ania Kubów
211,936
6.8k

⭐ Sign up for my Full Stack Developer Course: https://www.codewithania.com

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 https://github.com/typicode/json-server 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: https://github.com/kubowania/burger-api

For those of you wishing to check it out live visit here: https://my-burger-api.herokuapp.com/b...

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('https://my-burger-api.herokuapp.com/b...) 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  
YouTube:    / aniakubow  
Instagram:   / aniakubow  

#burgerAPI