Giter VIP home page Giter VIP logo

Comments (5)

typicode avatar typicode commented on July 16, 2024

That's a very good question.
You can already do pagination, filtering and relationship with JSON Server:

  • Pagination using _start and _end slicing params
  • Basic filtering using prop=someval
  • Relationship up to one degree /posts/1/comments

But all are very basic. Do you need more?

About JSON API spec, I think it's really a great project. However, there are other specs as well, like Swagger.

So, personally for the moment, I prefer to stick with something basic and without too much strong opinions.

But, if you need specifically a JSON API standard, there's https://github.com/fortunejs/fortune which implements it.

Maybe an adapter for lowdb which is the DB behind JSON Server would bring the best of both worlds.

from json-server.

diegoleme avatar diegoleme commented on July 16, 2024

You say create an adapter the lowdb for fortune js?

from json-server.

typicode avatar typicode commented on July 16, 2024

Actually, I may not have been very clear with my thoughts ^_^

So, JSON Server is lowdb + an Express router.
lowdb is what lets you have a simple JSON file as a database.

I was thinking that if there was a lowdb adapter for Fortune as there is for MongoDB, SQLite, ... that would create an experience similar to JSON Server (where you can use a text editor to edit the database) but with an API that follows the JSON API standard.

But, after giving a second thought. I'm not sure it's worth the effort if you just need a JSON API back-end.
So, I think the best would be to stick to Fortune only and forget about what I said. There may be other modules implementing JSON API as well.

Hope it makes more sense?

from json-server.

diegoleme avatar diegoleme commented on July 16, 2024

I think VERY interesting the way the json-server. Run without extra configuration and using json.

Fortune is another amazing tool, more complete, but requires a pre config.

Join the simplicity of json-server with the power of fortune. I think it would be amazing.

I am willing to code something

from json-server.

robcolburn avatar robcolburn commented on July 16, 2024

@typicode - weird your link above got messed up by Markdown, copy-paste fixed it
Fortune: https://github.com/fortunejs/fortune

from json-server.

Related Issues (20)

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.