This repo is talk about JSON-Server that is another way to store data besides using the database that we usually use like MySql / Postgres / MongoDB. JSON Server is good for front-end developers who need a quick back-end for prototyping and mocking. This appllication is for exercise purpose to make me understand about how JSON-Server work and connect it with REST API. In this repo i am use HTML for UI, CSS for styling and javascript for logic and also json-server that i am install global in my computer.
Main Page ( index.html )
- Get All data from database ( METHOD: GET )
- Sort data by ( Popular, Unpopular, Newest, Oldest )
- Search data by term
Create Page ( create.html )
- Add new data ( METHOD: POST )
Detail Page ( details.html )
- Get data from database by ID ( METHOD: GET )
- Delete data from database by ID ( METHOD: DELETE )
- Button like ( METHOD: UPDATE )
- Button dislike ( METHOD: UPDATE )
- Git clone Json Server or download zip.
- Open in your code editor (vscode, atom or other).
- Install globally json-server package to your computer.
- To start the server you can type in the terminal like this (json-server --watch data/db.json).
- db.json is optional, you can name the json file to store data any name you want.
- To start the HTML file for UI (index.html) i use extension (live server) in vscode.



