Skip to content
Advertisement

Web Server/Web service written in C++ in Linux

The requirement is to have Linux machine without additional installations aka Java, apache tomcat/jboss, that will be able to serve as a web server and to accept web service request (I will have to write some web service in C++ that will serve under this web server).

So, the question is if there is some C++ library that provides such a simulation of web server, since from outside it should behave the same way – to get http request and to redirect to appropriate web service.

Advertisement

Answer

Wrong place to ask (softwarerecs is probably more appropriate), but you probably want to use some HTTP server library like libonion, or libmongoose, or even Wt etc. All these libraries enable adding some web serving abilities to your application (e.g. to code your Web server application in a few dozen of lines of C++).

BTW, if coding in Ocaml consider using Ocsigen or Ocamlnet.

If you also want an HTTP client library, consider libcurl

You might also be interested in fastcgi. Several existing web servers are able to handle some web requests to a FastCGI application.

If you want to filter or transform HTTP requests, consider ICAP

You need to be familiar with the basics of web technologies (HTTP, HTML5, Javascript, AJAX, Websockets, Jquery, …) see e.g. w3schools (which is inperfect).

You might also need some database or indexed file library, like sqlite or GDBM

Advertisement