Skip to content

Commit

Permalink
Little instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbayerlein committed Jun 23, 2016
1 parent 597bad8 commit 5c31444
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# hapi-webpack-middleware

[![Build Status](https://travis-ci.org/danielbayerlein/hapi-webpack-middleware.svg?branch=master)](https://travis-ci.org/danielbayerlein/hapi-webpack-middleware)

**hapi-webpack-middleware** is a [webpack](https://github.com/webpack/webpack) middleware for [hapi.js](https://github.com/hapijs/hapi).

:warning: This middleware is automatically disabled in production!

Full support for:

* [webpack](https://webpack.github.io/docs/configuration.html#configuration-object-content)
* [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware)
* [webpack-hot-middleware](https://github.com/glenjamin/webpack-hot-middleware)

## Installation

```bash
$ npm install webpack webpack-dev-middleware webpack-hot-middleware @danielbayerlein/hapi-webpack-middleware --save-dev
```

## Usage

```javascript
server.register({
register: require('@danielbayerlein/hapi-webpack-middleware'),
options: {
webpack: {},
webpackDev: {},
webpackHot: {}
}
}, (err) => {

if (err) {
throw err;
}
});
```

## Configuration

* [webpack](https://github.com/webpack/webpack-dev-middleware#usage)
* [webpackDev](https://github.com/webpack/webpack-dev-middleware#usage)
* [webpackHot](https://github.com/glenjamin/webpack-hot-middleware/blob/072b1475e45cc94df4cab99907c538283ce1fafa/middleware.js#L8-L10)

## Contributing

1. Fork it
Expand Down

0 comments on commit 5c31444

Please sign in to comment.