Skip to content

ianmetcalf/redux-mithril-starter-app

Repository files navigation

Redux Mithril Starter App

Travis VersionEye Gitter

App Architecture

app-architecture

  • Centralizes logic for creating actions
  • Actions are plain javascript objects with a type property and optional payload
  • Actions conform to the flux standard action spec
  • Support async actions using thunk middleware
  • Pure functions that return new state based on current state and dispatched action
  • State shape is defined by composing reducers into a hierarchy with a single root
  • Provides API to dispatch() actions, getState() and subscribe() to changes in state
  • Allows wrapping dispatch calls with middleware
  • Centralizes logic for accessing and deriving properties from state
  • Decouples view from state

Up and Running Locally

  • Install nvm
$ curl https://raw.github.com/creationix/nvm/master/install.sh | sh && source ~/.nvm/nvm.sh
  • Install node and set default
$ nvm install stable && nvm alias default stable
  • Install local node packages
$ npm install
  • Start the server in development mode...
$ npm start
  • ...and open the app

Running a Production Build

  • Build the assets
$ npm run build
  • Start the server in production mode...
$ NODE_ENV=production npm start
  • ...and open the app

Contributing

Code should follow the style guide outlined here

In order to keep the code clean and free of bugs please run tests before every commit

$ npm test

You can run live linting and testing using the following command

$ npm run test:watch