Comments (5)
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.
You say create an adapter the lowdb for fortune js?
from json-server.
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.
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.
@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)
- _sort=price&_order=asc no longer working HOT 2
- it doesn't work on xxx.js or remote url,though xxx.json is ok
- SyntaxError: Unexpected token '||=' HOT 1
- Please, bring back the `--delay` option HOT 2
- CORS Issue (Access-Control-Allow-Headers)
- _sort=id&_order=desc do not work (--version 1.0.0-beta.0) HOT 1
- paginate should return empty data when there have a bigger `_page`, but return last page data now
- `_like` doesn't work anymore? HOT 1
- _dependent value error
- Licensing HOT 1
- Compressed Uploads
- Getting nested resources doesn't work HOT 1
- cant find package json-server within node_modules HOT 3
- delay [ms] is not working for me...... HOT 2
- I can not not increased by 1 for id HOT 1
- Newly added data is not recognized when trying to update it seconds later HOT 1
- multiple files with beta 1.0.0v1 HOT 1
- How to access multiple layers, for example /system/user system/menu
- Pagination fetches all Objects instead of just one page
- Implicit foreign key mapping not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-server.