How can I compile and run a HTTP server using THttpServer class? If I try
#include <THttpServer.h>
#include <TGraph.h>
int main() {
THttpServer *serv = new THttpServer("http:8080");
TGraph* gr = new TGraph(10);
gr->SetName("gr1");
serv->Register("graphs/subfolder", gr);
}
the code compiles but the server immediately stops. Although in root interpreter it works fine.
Is there a tutorial on how to compile and run such a server using cmake/g++?
My ROOT prompt:
------------------------------------------------------------------
| Welcome to ROOT 6.29/99 (link to root)|
| (c) 1995-2023, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for linuxx8664gcc on Oct 10 2023, 20:54:14 |
| From tags/v6-30-00-rc1@v6-30-00-rc1 |
| With c++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 |
| Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------------