mithril-express-middleware
v1.1.12
Published
express middleware for mithril.js apps
Downloads
22
Maintainers
Readme
mithril-express-middleware
use mithril routes with express
installation
npm install mithril-express-middleware
usage
import mithrilExpress from "mithril-express-middleware";
import * as browserMock from "mithril/test-utils/browserMock";
// use a mock DOM so we can run mithril on the server
browserMock(global);
import app from "./your-express-app";
import routes from "./your-mithril-routes";
app.use(mithrilExpress(routes));
see also
- mithril.js to get know what is mithril
- mithril-route-render to see what's behind the hood