Giter VIP home page Giter VIP logo

Comments (6)

typicode avatar typicode commented on August 15, 2024

Hi,

Thanks, that's interesting, I didn't try with hash ids. I used incremental ids (1, 2, 3...) to make it simpler from a user point of view.

Do you need json-server to support string as object ID or was it just a test?

from json-server.

windmaomao avatar windmaomao commented on August 15, 2024

that'll be great, since noDB is not using 1,2,3 as id, it's harder to use it with integer only. When you try to add a record, you don't know what it'll be, so calling a unique id algorithm will add that.

the other thing which will be very helpful is to have a standalone PHP script to take care of rest api instead of node.js app. Because most of server is equipped with php by default. This will increase the usage of your library big time.

from json-server.

eduardoinnorway avatar eduardoinnorway commented on August 15, 2024

I really need this feature... issues I have keys that looks like this as ID, 980067645AG
Really nice project.

from json-server.

windmaomao avatar windmaomao commented on August 15, 2024

seems this is a good candidate for node.js, https://github.com/flosse/json-file-store, however you still need to setup a server/express to use it effectively. But the functionalities is pretty much what CRUD needs.

from json-server.

typicode avatar typicode commented on August 15, 2024

hi @eduardoinnorway I'll try to come up with something.

Actually using https://github.com/typicode/lowdb for the JSON file database on JSON Server :)

from json-server.

typicode avatar typicode commented on August 15, 2024

Sorry, it took some times but the feature is here now in v0.5.11.
In case, it can't generate an integer id, it falls back to using a uuid.

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.