express middleware for building isomorphic applications with Marty & react-router
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
test
.gitignore
.jscsrc
.jshintignore
.jshintrc
.npmignore
.travis.yml
LICENSE
Makefile
README.md
index.js
package.json
serverCookies.js

README.md

Build Status

express middleware for building isomorphic applications with Marty & react-router.

##Usage

var Marty = require('marty');
var Router = require('react-router');
var RouteHandler = Router.RouteHandler;

var routes = (
  <Route handler={RouteHandler}>
    <Route name='foo' path='/foo/:id' handler={Foo} />
    <Route name='var' path='/bar/:id' handler={Bar} />
  </Route>
);

class IsomorphicApp extends Marty.Application {
  constructor() {
    this.register('userStore', require('./stores/userStore'));
  }
}

var app = express();

app.use(require('marty-express')({
  routes: routes, // required
  application: IsomorphicApp, //required
  body: 'body', // name of local body variable in view, default: body
  state: 'state' // name of local state variable in view, default: state
}));

##Quick start

make bootstrap      #Install all dependencies
make test           #Run tests

##Git Commit Messages

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Reference issues and pull requests liberally
  • Consider starting the commit message with an applicable emoji:
    • πŸ’„ :lipstick: when improving the format/structure of the code
    • 🐎 :racehorse: when improving performance
    • 🚱 :non-potable_water: when plugging memory leaks
    • πŸ“ :memo: when writing docs
    • 🐧 :penguin: when fixing something on Linux
    • 🍎 :apple: when fixing something on Mac OS
    • 🏁 :checkered_flag: when fixing something on Windows
    • πŸ› :bug: when fixing a bug
    • πŸ”₯ :fire: when removing code or files
    • πŸ’š :green_heart: when fixing the CI build
    • βœ… :white_check_mark: when adding tests
    • πŸ”’ :lock: when dealing with security
    • ⬆️ :arrow_up: when upgrading dependencies
    • ⬇️ :arrow_down: when downgrading dependencies

(From atom)

##Maintainers

##License