Coder Social home page Coder Social logo

json-server's Introduction

endpoints:

filtering :

get all where category home http://localhost:4000/items?category=home

get all where category home and price 10 http://localhost:4000/items?category=home&price=10

search in all fields letters sa: http://localhost:4000/items?q=sa

sorting:

sort by price http://localhost:4000/items?_sort=price

sort by price and sort desc http://localhost:4000/items?_sort=price&_order=desc

sort by price desc and discount asc http://localhost:4000/items?_sort=price,discount&_order=desc,asc

operators:

get all where : price greater than or equal 10 and less than or equal 50 http://localhost:4000/items?price_gte=10&price_lte=50

get all where id not equal : http://localhost:4000/items?id_ne=2

like operator to spcify regex to find data: get all where category start with letter s : http://localhost:4000/items?category_like=^s

realtions:

populate the reviews for each item in the response : http://localhost:4000/items?_embed=reviews

populate the reviews for the item id 1 http://localhost:4000/items/1?_embed=reviews

populate the item for the review : http://localhost:4000/reviews?_expand=item

pagination

see youtube tutorial saved as playlist name json-server tutorial

json-server's People

Contributors

barmgeat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.