A zero-configuration server that serves server-rendered snapshots of Create React App
Last updated 3 years ago by rovansteen .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-snapshot-server 
SYNC missed versions from official npm registry.

React Snapshot Server Build Status Coverage Status

???? A zero-configuration server that serves server-rendered snapshots of Create React App


React Snapshot Server is a server based on zeit/micro that creates snapshots from your Create React Apps on the fly. This is done by running the application on the server in jsdom and saving the HTML in a snapshot. The snapshot is then saved and is valid for a given period of time, after that if the page is requested again a new snapshot will be generated.

Starting the server

You can start the server by running node node_modules/react-snapshot-server/bin/cli.js. To make this easier you can open up your package.json and add the following script

  "scripts": {
    "serve": "react-snapshot-server"


You can use the following options.

Usage: react-snapshot-server [options] [command]


  help  Display help


  -P, --path [value]  The path to the build directory (defaults to "build")
  -p, --port <n>      The port on which the server will be running (defaults to 3000)
  -v, --validity      Time in minutes that a snapshot is valid (defaults to 10)


Install React Snapshot Server by running yarn add react-snapshot-server -D

React Snapshot Server works almost out of the box with zero configuration if you use Create React App we do require a few little changes, but it only takes a few seconds work!

Open up your src/index.js file. and replace

- import ReactDOM from 'react-dom';
+ import { render } from 'react-snapshot-server';

- ReactDOM.render(<App />, document.getElementById('root'));
+ render(App, document.getElementById('root'));

and that's it, you now have server side rendering!


We use SemVer for versioning. For the versions available, see the tags on this repository.


See also the list of contributors who participated in this project.


This project is licensed under the MIT License - see the file for details


  • next.js for server rendering inspiration.
  • micro for awesome async http microservice
  • react-snapshot for the idea of snapshotting as server rendering.
  • create-react-app for a react app up and running in seconds.

Current Tags

  • 0.2.4                                ...           latest (3 years ago)

9 Versions

  • 0.2.4                                ...           3 years ago
  • 0.2.3                                ...           3 years ago
  • 0.2.2                                ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 11
Dependencies (10)
Dev Dependencies (19)
Dependents (0)

Copyright 2014 - 2016 © |