In the section, we're going to be demonstrating how to set up a local JSON server, so it's going to
be an end point that's going to connect to a DB that Jason file, be able to load the content from the
DB Jason file and interacted with it within JavaScript and also do the full CRUD operations.
So let's create, read, update and delete to the content within the DB JSON file.
So we've got a listing on the right hand side within the Web browser, all of the content that we have
within the database file so we can also update it.
So I'm just going to add Tu's to the ID one and do an update to it.
And also we see that the DB Jason file updates correspondingly.
We can also create new items, so creating a new item and that just gets added to the end.
So within the test and this is a great way that you can create various endpoints.
So they're all done with Jason Server.
So running the Jason server locally gives you a great place to test practice and making all of your
requests.
So this includes doing the post and get to get all of the content, the loading of all of the content
using create.
So using that put method to add the content to the database and then also delete.
So if we have an item that we want to delete, let's say number 17, we want to delete that, we press
the delete button and that's going to remove it from our page as well as from the database.
So all four of the basic functions for the persistent storage and are done with JavaScript connecting
to the DB Jason.
And this is going to be we are going to need to run node and node package manager in order to set up
JSON server are going to be supplying the basic commands, opening up the terminal and running the commands
so we can have our live database functioning in the back.
If you have any questions or comments, please let me know all of the source code is included and as
provided, try out the code within your own editor, make some updates and even customize and create
your own JSON database that you can interact with and practice making AJAX requests with.