Nucleic Photon Magnetizer

    react-server-middleware-json-response

    0.6.1 • Public • Published

    JSON Response middleware for React Server

    Use this middleware to return a JSON-serialized object from a React Server page.

    import JsonResponseMiddleware from "react-server-middleware-json-response"
     
    export default class DataEndpoint {
        static middleware() {
            return [JsonResponseMiddleware];
        }
     
        getResponseData() {
            return { result: "OK!" };
        }
    }

    Install

    npm i react-server-middleware-json-response

    DownloadsWeekly Downloads

    1

    Version

    0.6.1

    License

    Apache-2.0

    Last publish

    Collaborators

    • avastu
    • drewpc
    • gigabo