librespeed/speedtest-go

Anyway to have the html file run independently from the Go File Server?

O-Luhishi opened this issue · 2 comments

Description

Could there be a way to have the index.html file to run independently from the go endpoint/file server. Basically, if I wanted to integrate this into an existing React/Vue project it doesn't seem like it can work. When I run the index.html file by itself using a Python server or React it isn't able to ping the Rest endpoints for /garbage /empty etc. Any chance this is possible?

Why it should be implemented

This would benefit anyone looking to port this project into an already existing React/Vue/Js project.

Thank you!

Sorry for the late reply, been too busy IRL.

I'll see what I can do, or PR is welcomed! :)

I think that you can already use it as a backend only, just point to the endpoints from your custom frontend.

EDIT: The assets folder was designed for custom frontends served by the backend. If you wish to serve your static assets without configuring yet another server (i.e. nginx, Apache), you can just put your custom built frontend assets into the assets folder and have the backend serve them for you.