Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialize without server #304

Open
Truemedia opened this issue Oct 19, 2018 · 1 comment
Open

Serialize without server #304

Truemedia opened this issue Oct 19, 2018 · 1 comment

Comments

@Truemedia
Copy link

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.

@gr0uch
Copy link
Member

gr0uch commented Oct 23, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants