Commit Graph

6 Commits

Author SHA1 Message Date
Bernd Ahlers
294f2eb9d3 Make webpack /api proxy host and port configurable (#10202)
* 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
2021-03-05 15:07:34 +01:00
Bernd Ahlers
2b4a159d25 Let devServer proxy all "/api" requests to the server API (#9679)
* Let devServer proxy all "/api" requests to the server API

* Fixing linter hints.

Co-authored-by: Dennis Oelkers <dennis@graylog.com>
2020-12-09 09:19:01 +01:00
Bernd Ahlers
f35df42e16 Change license to SSPL (#9504)
See the following links for more details:

- https://www.graylog.org/post/graylog-announces-4-0-release-of-its-log-management-platform
- https://www.graylog.org/post/graylog-v4-0-licensing-sspl
2020-11-16 18:41:59 +01:00
Edmundo Alvarez
bf72a0fc9a Allow customization of dev server host (#4500)
- Use localhost by default
- Add --host option to change the default value
- Document changes in README
2018-01-22 18:05:35 +01:00
Edmundo Alvarez
be7a102937 Web dev improvements (#4388)
* 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
2017-12-05 11:47:30 +01:00
Edmundo Alvarez
2d0c065103 Replace webpack-dev-server with custom express server (#4328)
* 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.
2017-11-09 12:12:16 +01:00