1.1.0 • Published 7 years ago
mithril-route-render v1.1.0
mithril-route-render
use mithril routes with express
installation
npm install mithril-route-render
usage
import routeRender from "mithril-route-render";
import * as browserMock from "mithril/test-utils/browserMock";
// use a mock DOM so we can run mithril on the server
browserMock(global);
import routes from "./your-mithril-routes";
routeRender(routes, "/route", "/default-route").then((partialHtml) => {
console.log(partialHtml);
});
see also
- mithril.js to get know what is mithril
- mithril-render to see what's behind the hood
1.1.0
7 years ago