Skip to content

aldoignatachandra/Javascript-JsonServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON SERVER
(HTML, CSS & Javascript)

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.

Features

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 )

How To Install

  1. Git clone Json Server or download zip.
  2. Open in your code editor (vscode, atom or other).
  3. Install globally json-server package to your computer.
  4. To start the server you can type in the terminal like this (json-server --watch data/db.json).
  5. db.json is optional, you can name the json file to store data any name you want.
  6. To start the HTML file for UI (index.html) i use extension (live server) in vscode.

Screenshot from the App

License

ISC

About

Make a simple REST API using json-server package from NPM

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors