Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pbeshai/react-express-example
A basic example of using Express and Facebook's React for both client-side and server-side rendering.
https://github.com/pbeshai/react-express-example
Last synced: 3 months ago
JSON representation
A basic example of using Express and Facebook's React for both client-side and server-side rendering.
- Host: GitHub
- URL: https://github.com/pbeshai/react-express-example
- Owner: pbeshai
- License: mit
- Created: 2014-01-15T05:52:41.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-27T20:08:43.000Z (almost 11 years ago)
- Last Synced: 2024-04-14T11:14:17.073Z (10 months ago)
- Language: JavaScript
- Size: 232 KB
- Stars: 45
- Watchers: 2
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Express Example
A basic example of using [Express](http://expressjs.com/) and [React](http://facebook.github.io/react/index.html) for both client-side and server-side rendering. This project makes use of a basic layout with a global react mount point, which differs from [react-page](https://github.com/facebook/react-page) where all of the html is rendered from React. One benefit of this approach is the ability to include a doctype.
## How To
Run `grunt browserify` to compile the client-side code into `app/public/js/output.js`.
Start the Express server by running `node app/server.js`.
## Tools Used
This project uses:* [node-jsx](https://github.com/petehunt/node-jsx) for transparently compiling files with JSX when requiring on the server-side
* [Express](http://expressjs.com/) for running the web server
* [React](http://facebook.github.io/react/index.html) for server-side and client-side rendering
* [grunt-react](https://github.com/ericclemmons/grunt-react) with [browserify](http://browserify.org/) to concatenate and compile the JSX for the client-side code