This project was initially conceived to experiment with using these technologies in conjunction with one-another. I have written a blog that relates to this codebase.
This project is useful for:
- understanding how to handle asyncronousity in Redux action creators
- seeing how you can use Socket.io with Redux
- building your own Redux powered application
- forking so that you can build your own 3REE stack app!
- Asyncronous Redux actions example
- Use of RethinkDB Changefeeds for realtime updates reflected in the UI
- Clone the repo
git clone email@example.com:GordyD/3ree.git
- Make sure you are using Node v6.0.0 (I recommend using n for Node version management)
- If your local environment is not reflected by
config/default.json, then add a file at
config/local.jsonto provide local customisation.
npm run db-setupto set up DB
Running Dev Server
npm run start:win
This will start the Webpack dev server - for serving the client, as well as the server-side API.
Go to http://localhost:3001 in two separate tabs - see changes propagate in real time (Hot Module Replacement works too).
Running Production Server
You will need to roll out your own deployment script for a server, but before you can ship you will need to:
- Build the client with
npm run build:prod
- Ensure all production npm modules are installed on the server. e.g.
npm install --prod
- Rsync your application to your server
- Set up nginx or your web server of choice to map HTTP requests for your URL to
npm run start:prodto run on your server
- Go to your URL
NOTE: Production has not been tested on Windows.
|React Router||Universal routing||2.4.0|
|Express||Node.js server framework||4.13.0|
|Socket.io||Used for realtime communication between clients and server||1.4.0|
|Webpack||Module bundling + build for client||1.13.0|
|Superagent||Universal http requests||1.8.0|
|Stylus||Expressive, dynamic, robust CSS||0.54.0|