* Make webpack /api proxy host and port configurable
* Use a single "--api-url" parameter instead of two
That allows the usage of TLS enabled server backends.
* Use GRAYLOG_HTTP_PUBLISH_URI as apiUrl if set
* Rename env to GRAYLOG_API_URL
Keep backwards compat for old name and use case.
* Fix linter warning
* Fix linter warning
* Customize port number in dev-server
Let users customize port number by passing `--port=<port>` as argument.
If the port is already taken, we will start the web interface in a
random one.
* Remove alternative dev setup
* Revert dev server port
Changed it accidentally during some tests.
* Remove react-hot-loader dev build
The `start` build using HMR alongside react-hot-loader was already not
working as it should with webpack-dev-server. Modules got reloaded, but the
application state was reset on every change.
I have been trying a couple of times to make HMR work with the new express
dev server, but I just managed to reproduce what it achieved in the
previous build (reloading the whole component tree, but losing the state).
All of that making the current webpack configuration more complicated.
I think react-hot-loader is a good idea that can be helpful specially when
styling components, but currently I see that it produces way too maintenance
burden for the benefits it provides. Also, nobody in the team seems to be
using it for development.
Long story short, this commit removes react-hot-loader from our dev build. We
still use Webpack HMR to reload the browser.
The commit also replaces the `start` script with `start-nohmr`, so
running `yarn start` will use the no react-hot-loader dev server.
* Update README file
- Include details to use yarn in development
- Remove old warnings and information
- Remove mentions of the react-hot-loader build
- Update information on upgrade packages
- Update information on IntelliJ setup
* Improve some texts in the README
* Add documentation on how to customize port number
* Fix linter errors
* Replace webpack-dev-server with custom express
Many of us (if not everyone) has problems running webpack-dev-server
with many plugins, as the server keeps disconnecting from the web
browser.
In order to solve that, but keeping the setup easy to setup and start,
this commit adds a custom express server, using webpack-dev-middleware
and webpack-hot-middleware to achieve something similar to what we had
before.
* Add REPLACE_MODULES variable
Development configurations need it to properly run.