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

Add a package with JSON response middleware #745

Merged
merged 1 commit into from
Nov 10, 2016

Conversation

gigabo
Copy link
Contributor

@gigabo gigabo commented Nov 10, 2016

This just handles some of the boilerplate involved with setting up a JSON
endpoint in React Server.

Example (from the README):

import JsonResponseMiddleware from "react-server-middleware-json-response"

export default class DataEndpoint {
    static middleware() {
        return [JsonResponseMiddleware];
    }

    getResponseData() {
        return { result: "OK!" };
    }
}

This just handles some of the boilerplate involved with setting up a JSON
endpoint in React Server.
@gigabo gigabo added the enhancement New functionality. label Nov 10, 2016
@gigabo gigabo merged commit a02a997 into redfin:master Nov 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants