Skip to content

feat: support hono #1890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jul 17, 2024
Prev Previous commit
Next Next commit
docs: update readme
  • Loading branch information
alexander-akait committed Jul 16, 2024
commit cb4485998cd914f96dde1fcd9b677f8ba2fb0219
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,8 @@ app.listen(3000, () => console.log("Example app listening on port 3000!"));
```js
const Koa = require("koa");
const webpack = require("webpack");
const webpackConfig = require("./test/fixtures/webpack.simple.config");
const middleware = require("./dist");
const webpackConfig = require("./webpack.simple.config");
const middleware = require("webpack-dev-middleware");

const compiler = webpack(webpackConfig);
const devMiddlewareOptions = {
Expand Down Expand Up @@ -694,6 +694,27 @@ const devMiddlewareOptions = {
})();
```

### Hono

```js
import webpack from "webpack";
import { serve } from "@hono/node-server";
import { Hono } from "hono";
import devMiddleware from "webpack-dev-middleware";
import webpackConfig from "./webpack.config.js";

const compiler = webpack(webpackConfig);
const devMiddlewareOptions = {
/** Your webpack-dev-middleware-options */
};

const app = new Hono();

app.use(devMiddleware.honoWrapper(compiler, devMiddlewareOptions));

serve(app);
```

## Contributing

Please take a moment to read our contributing guidelines if you haven't yet done so.
Expand Down
Loading