THttpServer - access files from the disk

Hi all,
I’m building a user interface using HTML and CSS and I wanted to know if I can integrate the HTML
page and CSS files to the ROOT. Although I have managed to do it for the HTML, I am unsure whether it is possible for CSS as well.
Thank you in advance

Hi and welcome on the forum!

THttpServer is designed to browse objects in the ROOT application and not data on the file system.
Therefore it is not obvious to access files though such interface.

If I understand you right, you already can run THttpServer with custom html like shown in tutorials/http/custom.C and tutorials/http/custom.htm example.

To include CSS to such HTML file, one need to add reference like:

   <link rel="stylesheet" type="text/css" href="currentdir/main.css">

Here magic word is “currentdir/”. It let reference files from current directory where ROOT application is running.

Regards,
Sergey

Hi,

Thank you so much, it’s working properly now
Many thanks!!

Best regards