4 ms·
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++?
- tuna_hn 4y ago[dead]
- _benj 4y agoI once used facil.io and quite enjoyed it!
- josephernest 4y agothanks! i just looked, it doesn't seem to have this easy "route('/hello/world')" system, at least not in the main examples, is it included?
- melenaboija 4y agoI have been using Crow C++. I find it easy to use and pretty straightforward. https://github.com/ipkn/crow https://github.com/ipkn/crow
- data-cat 4y agoI really liked Crow but unfortunately it seems like the project has been abandoned.
- cozzyd 4y agoIt's been picked up by other maintainers
- melenaboija 4y agoAs of today has been doing all what I needed and I found no bugs for my use
- Kranar 4y agoIf we're talking about this: https://crowcpp.org https://crowcpp.org Then the project is pretty active, has multiple commits per week based on its log.
- cozzyd 4y agoI've used CrowCpp and httplib. httplib has more flexible routing (using regex), though CrowCpp is overall nicer to use. edit: here's a link to httplib: https://github.com/yhirose/cpp-httplib https://github.com/yhirose/cpp-httplib (CrowCpp has already been linked by someone else)
- _448 4y agoWhy not use Wt(Https://www.webtoolkit.eu)? It has all the bells and whistles included. Here is the examples page showing what it is capable of: https://www.webtoolkit.eu/widgets https://www.webtoolkit.eu/widgets The other option is uWs(https://github.com/uNetworking/uWebSockets https://github.com/uNetworking/uWebSockets) but then you have to include the missing parts such as templating system and ORM.
- p0d 4y agoThink you are looking for Blazor :-)
- adarsh_p 4y agoWe've used this and like it so far: https://github.com/meltwater/served https://github.com/meltwater/served
- tomcam 4y agohttps://kore.io/ https://kore.io/