Ask HN: C/C++ web framework with routes (like Node.js, Python Flask)
Node.js, and Python Flask or Bottle micro-frameworks make it possible to create a server with routes like this:
from bottle import route, run
@route('/hello')
def index():
return 'hello world'
@route('/news')
def news():
...
run(port=8080)
What are the most popular solutions like this in C or C++?
13 comments
[ 0.72 ms ] story [ 36.4 ms ] threadi just looked, it doesn't seem to have this easy "route('/hello/world')" system, at least not in the main examples, is it included?
https://github.com/ipkn/crow
https://crowcpp.org
Then the project is pretty active, has multiple commits per week based on its log.
edit: here's a link to httplib: https://github.com/yhirose/cpp-httplib (CrowCpp has already been linked by someone else)
The other option is uWs(https://github.com/uNetworking/uWebSockets) but then you have to include the missing parts such as templating system and ORM.