nhagen / marty-koa

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

Home Page:http://martyjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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>
);

var app = express();

app.use(require('marty-express')({
  routes: routes, // required
  view: 'foo', // name of view to render, default: index
  local: 'bar', // name of local variable in view, default: body
  marty: ..., // instance of Marty to use, default: require('marty')
}));

##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

About

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

http://martyjs.org

License:MIT License


Languages

Language:JavaScript 96.4%Language:Makefile 2.6%Language:Shell 1.0%