Integrating C++ frontend with HTML backend?

Hi guys,

I was working on a project recently, the project used Python as the backend and HTML/CSS as the frontend/UI. Python is quite easy to interface with web pages as it has libraries such as Flask(which I used).

It got me thinking... Is it possible to use C++ as your backend and HTML/CSS as your frontend? And if so, do you know any ways or libraries that can achieve this?

Thanks
Last edited on
If by “backend” you mean a CGI on a server, then yes, of course. Any executable script or program can be used as a backend. It works the same way, too.

There are a number of libraries that exist to help write CGI applications in C++. One is the GNU Foundation’s “cgicc” https://www.gnu.org/software/cgicc/doc/index.html

You’d have to use Google to find other alternatives, if that one displeases you.
Flask is a small web framework. It's more sophisticated than running a cgi script/app.

There's not a lot of C++/web integration. Many years ago I was forced (by my employer) to try Wt (webtoolkit), a C++ web framework, it is pretty awful/downright dangerous. There's client side C++ in Mozilla's Web Assembly, but that's more a javascript replacement.

I think it's more a (lack of) meeting of minds, rather than a technical challenge.
Last edited on
Topic archived. No new replies allowed.