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