1 | const merge = require('deepmerge');
|
2 | const Future = require('fluture');
|
3 | const { serve, validate } = require('./webpack');
|
4 |
|
5 | // devServer :: (Object config -> Object api) -> Future () Function
|
6 | const devServer = (config, { options }) => Future
|
7 | .of(merge({ devServer: { host: 'localhost', port: 5000, noInfo: !options.debug } }, config))
|
8 | .chain(validate)
|
9 | .chain(serve);
|
10 |
|
11 | module.exports = devServer;
|