Skip to content

Universal Web App Example with React, React-Router and Redux

License

Notifications You must be signed in to change notification settings

nilshartmann/react-vote-example

Repository files navigation

React Vote Example

This is just another Universal Web App Example using the following tech stack:

Brought to you by Oliver Zeigermann and Nils Hartmann

React Universal Sample Application

Install and run

  • Clone the repository
  • run npm install
  • run npm start
  • Open the application in your webbrowser at http://localhost:3000. The first hit is completely rendered on server-side. All following interactions take place on the client-side.

Developing

Instead of npm start you can run the server with an embedded webpack server that supports hot reloading of your react component. Start it with:

npm run server:hot

Running tests

We have included a few unit- and integrationtests that you can run:

  • npm test will run mocha with unit test (run npm run test:cov to get a coverage report)
  • npm run test:integration will run integration tests based on Karma and PhantomJS

Using MongoDB

If not configured otherwise, the Vote App will store it's data on the server just in memory. If you want to use MongoDb for data storage, you can enable support by setting the USE_MONGODB environment variable to true when launching the server process:

USE_MONGODB=true npm start

Before starting the server for the first time you can import some dummy data into your database by running

npm run import-mongodb-data

Keep up-to-date

We plan to enhance this example application in the future. To make sure you don't miss anything you can watch this repository or follow us on twitter @nilshartmann (Nils) and @djcordhose (Olli)

Contribution

If you have any ideas for improvement, discover bugs or just want to give feedback, don't hesitate to open an issue or pull request in this repository.

License

MIT

About

Universal Web App Example with React, React-Router and Redux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published