Skip to content

tlaziuk/mithril-express-middleware

Repository files navigation

mithril-express-middleware

Build Status Coverage Status dependencies Status devDependencies Status peerDependencies Status npm version downloads license

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