Git Product home page Git Product logo

daiv-json-server's Introduction

daiv-json-server

JSON server using JSONPlaceholder

Reference Link: https://github.com/typicode/json-server

https://my-json-server.typicode.com/ubuntu-prasad/daiv-json-server

Use your own data Fork it and change db.json values or create a repo with a db.json file.

Mockend.com Fake API

Refer url for details https://docs.mockend.com/

Installation

Install Mockend GitHub app on your repo. For the rest of the docs, we'll consider it's org/repo.

Create a .mockend.json file to describe your API.

Configuration

Supported types are: string, int, boolean and date.

You can also describe has many and belongs to relations.

For example:

.mockend.json

{
  "Post": {
    "title": "string",
    "views": "int",
    "published": "boolean",
    "createdAt": "date",
    "comments": "Comment[]"
  },
  "Comment": {
    "body": "string",
    "post": "Post"
  }
}

Routes

For REST, based on the previous config, the following routes will be created:

GET https://mockend.com/ubuntu-prasad/daiv-json-server/posts
GET https://mockend.com/ubuntu-prasad/daiv-json-server/posts/<id>
GET https://mockend.com/ubuntu-prasad/daiv-json-server/comments
GET https://mockend.com/ubuntu-prasad/daiv-json-server/comments/<id>

Routes can take query parameters, see below.

GraphQL, will be available at:

https://mockend.com/ubuntu-prasad/daiv-json-server/graphql

Mockend supports Git branches, you can therefore have multiple mock APIs for different features on the same repo.

Simply add tree/:branch_name to your URL, for example:

/ubuntu-prasad/daiv-json-server/tree/my-awesome-feature/graphql

Queries

REST

Query parameters can be used to filter, sort and paginate lists:

  • _eq _ne
    • equal, not equal
  • _gt _lt
    • greater than, lower than
  • _order
    • sort data (asc desc)
  • limit offset
    • use them to paginate your results

For example:

GET /posts?date_order=desc

GET /posts
    ?views_gt=10
    &published_eq=true
    &views_order=desc
    &limit=5

GraphQL

A GraphiQL interface, with specific documentation for your API, can be found directly at:

https://mockend.com/ubuntu-prasad/daiv-json-server/graphql

FAKE API Websites:

  1. https://reqres.in/
  2. http://fakeapi.jsonparseronline.com/
  3. http://jsonplaceholder.typicode.com/
  4. https://fakerestapi.com/
  5. https://fakejson.com/ (Freemium)
  6. https://microenv.com/

daiv-json-server's People

Contributors

ubuntu-prasad avatar

Watchers

 avatar  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.