fortune
fortune copied to clipboard
Serialize without server
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.
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.