Skip to content
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

Make Wobserver usable as a standalone Plug #1

Closed
notriddle opened this issue Feb 13, 2017 · 5 comments · Fixed by #2
Closed

Make Wobserver usable as a standalone Plug #1

notriddle opened this issue Feb 13, 2017 · 5 comments · Fixed by #2
Assignees

Comments

@notriddle
Copy link

Instead of having wobserver run its own cowboy instance with (apparently) no authentication, I'd like to be able to run wobserver from inside an app's existing administrator panel.

The main barrier to this is wobserver's websockets, which can be replaced with EventSource.

@IanLuites
Copy link
Contributor

Completely agree. We are currently running into the same thing. It is a waste to have multiple cowboy instances.

Completely dropping it would not be possible, because I would like to keep the drop-in usability.

I'm currently working on an option to just run it as plug without starting cowboy and when done will update the readme to show how to redirect the websocket.

Do note that the interface will fallback to the api/ajax if it can't connect through websocket.

@IanLuites IanLuites reopened this Feb 13, 2017
@notriddle
Copy link
Author

I'd like to have real-time updates, so forcing it to use fallback mode is kind of undesirable.

@IanLuites IanLuites self-assigned this Feb 13, 2017
@IanLuites
Copy link
Contributor

IanLuites commented Feb 13, 2017

I think #2 should enable you to run wobserver as a plug.

Wobserver does not start a supervisor or :cowboy in :plug mode and I added an example in the config to show how to forward the requests and the websocket.

@IanLuites
Copy link
Contributor

Version 0.1.4 is now on hex and has this feature.

@notriddle
Copy link
Author

Cool, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants