Search code examples
c++fastcgi

Is it possible to make a website in C++ using FastCGI Libraries?


Is it possible that you could make a website entirely in C++ using the FastCGI libraries? If so, are there any examples, or any thing I can read that I can learn more from?


Solution

  • Yes, it's possible but not recommended unless you need something very specific. I'd only use C++ for a web app if I was severely RAM-constrained or if I worked at something that requires VERY HIGH request per seconds.

    Take in consideration that nowadays high level languages such as Python or C# .NET has much better web tools and frameworks than C++, and its standard libraries work very well. And you don't have to worry about memory management!

    If you still want to continue with this, here you have a basic guide which covers beginner's aspects. It covers from preparing environment, writing a sample Hello world web page, and setting up Nginx for running it:

    http://chriswu.me/blog/writing-hello-world-in-fcgi-with-c-plus-plus/