An example of how to serve React components on NodeJS in order to decrease the load time of the application. Created because of a post on my personal blog. Link on the repository.
If you want to see the app live, just click here
Clone the repository:
$ git clone https://github.com/MiguhRuiz/react-server-render.git
Then, inside the folder...
$ cd react-server-render
Install all packages(both server and client, might take a bit of time):
$ npm install
Build the components(the FrontEnd ones, Gulp is required):
$ gulp
Start the server
$ npm start
If you want to use a piece of this software look at Extra information about the license
Copyright (c) 2016 - Miguel Ruiz
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
If you want to use this software you have to meet the license requirements. Instead of that you must include that this content has been created for a blog post and the link of it. You can find it on the top of the repository.
An example of that should be:
This code is part of the spanish post "Renderizando componentes desde el servidor" created by Miguh Ruiz. If you want to read it just click here