Very simple node server that render React app bundle into HTML string


000.2.44 years ago4 years agoMinified + gzip package size for @archangel63/react-render-server in KB


What is it?

It's a very simple nodejs server that render React app to HTML string.


Usage example

IMPORTANT! This package requires babel-polyfill for correct work!

  1. Install package with npm i --save @archangel63/react-render-server command

  2. Create your server.js file with the following content: ` require("babel-polyfill");

    require("@archangel63/react-render-server").run(5001, {

     baseDir: __dirname,
     mode: "render"

    }); `

  3. Run it with node server.js

  4. Pass requests to the http://localhost:5001 with HTTP header X-LOCAL-HOST: *your api server address*



If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.