Skip to content

Serving HTML report to browsers with --real-time-html server #2848

@NattyNarwhal

Description

@NattyNarwhal

One pain point we've been having with using GoAccess on remote servers is there's a few moving parts to serve the real-time HTML report. We need a web server running to serve the HTML report (sometimes you can reuse an existing one, but this might not necessarily be the case), and obviously it needs GoAccess running for the WebSocket.

For cases like this where you want to view the report from a remote system, in a browser with minimal fuss, I'm thinking it might be possible to use the existing WebSocket server for this - just serve the HTML report instead of only serving a WebSocket. This would make it easier to be able to serve it with just a single command to start GoAccess (and make it easier to manage if you want to leave it running too).

I'm currently implementing this, though it has some problems - i.e. sometimes the existing socket send for WebSockets will drop, likely because it wasn't designed for sending whole files. If this is a feature that you want upstream, let me know.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions