fortune icon indicating copy to clipboard operation
fortune copied to clipboard

Serialize without server

Open Truemedia opened this issue 5 years ago • 1 comments

So I'm looking to be able to serialise a response from doing a find on my store using JSON API adapter.

I can do this fine using the server example and making a request trigger the find, but I want to be able to use the find programatically like so:

store.find('user', userId).then( (req, res) => { // Serialize response here });

The main reason behind this is to be able to not need a server running for the db in cases of running functions where no request is needed.

Truemedia avatar Oct 19 '18 13:10 Truemedia

If you want, you can call the processResponse method in the fortune-json-api serializer directly, you'd also have to mock a few things but it should be possible to do.

gr0uch avatar Oct 23 '18 20:10 gr0uch