Testing out react, redux universal JS and all the things.
Перейти к файлу
Stuart Colville b65341d2a2 fix readme 2015-12-14 10:02:17 +00:00
api Initial commit 2015-12-07 11:01:25 +00:00
bin Initial commit 2015-12-07 11:01:25 +00:00
docs Initial commit 2015-12-07 11:01:25 +00:00
src Update server to redirect to https on heroku 2015-12-14 09:35:04 +00:00
static Initial commit 2015-12-07 11:01:25 +00:00
webpack Initial commit 2015-12-07 11:01:25 +00:00
.babelrc Initial commit 2015-12-07 11:01:25 +00:00
.editorconfig Initial commit 2015-12-07 11:01:25 +00:00
.eslintignore Initial commit 2015-12-07 11:01:25 +00:00
.eslintrc Search results 2015-12-10 12:14:14 -05:00
.gitignore Initial commit 2015-12-07 11:01:25 +00:00
.nvmrc Initial commit 2015-12-07 11:01:25 +00:00
.travis.yml Initial commit 2015-12-07 11:01:25 +00:00
CONTRIBUTING.md Initial commit 2015-12-07 11:01:25 +00:00
LICENSE Initial commit 2015-12-07 11:01:25 +00:00
README.md fix readme 2015-12-14 10:02:17 +00:00
README_ORIG.md Initial commit 2015-12-07 11:01:25 +00:00
app.json Remove boilerplate add search form 2015-12-08 17:40:31 -05:00
karma.conf.js Initial commit 2015-12-07 11:01:25 +00:00
package.json Heroku support 2015-12-14 01:54:19 -05:00
server.babel.js Initial commit 2015-12-07 11:01:25 +00:00
tests.webpack.js Initial commit 2015-12-07 11:01:25 +00:00

README.md

Mozlando Frontend Demo

Original sample code is on erikras/react-redux-universal-hot-example.

This is an experiment to test out what Redux + React + universal JS looks like as a demo Addons front-end.

The idea to it to try and do the following:

  • Create a basic fake search API that returns random data.
  • Create a basic search result page.
  • Play with forms that work server-side only as well as via redux.
  • It doesn't need to look pretty though we can hack together some styles.

Getting started

  • You'll need nvm + node 4.x + npm 3.x to be able to install the node deps. You may need to npm install -g npm after updating node.
  • Once you have that install the deps with npm install.
  • To fire things up use npm run dev.
  • The redux devtools can be shown with ctrl+shift+h.

Running the production version.

The CSS only fully works with JS when running the dev server. To see it without JS you'll need to build it for production.

To see the built-code running fully as a universal app you can built and run it in production mode with:

npm run build
PORT=8080 npm run start

Deploying to Heroku

  • Set heroku config:set NPM_CONFIG_PRODUCTION=false to install dev deps.
  • Push to heroku:master

Demo Site

See https://mozlando-frontend-demo.herokuapp.com/