Update for 28-04-22 14:30

This commit is contained in:
Tyler Perkins 2022-04-28 14:30:01 -04:00
parent e883d5109b
commit 411d8d9546
2 changed files with 56 additions and 0 deletions

View File

@ -3,6 +3,10 @@
Object Oriented super set of C. Great for larger projects, with minimal Object Oriented super set of C. Great for larger projects, with minimal
drawbacks due to the Object abstraction. drawbacks due to the Object abstraction.
== Frameworks and libraries ==
* [[Crow]]
== Features == == Features ==
* [[constexpr]] * [[constexpr]]

52
tech/Crow.wiki Normal file
View File

@ -0,0 +1,52 @@
= Crow =
Crow is a fast, [[flask]]-like C++ microframework
== Apps ==
Crow provides a `crow::App` type that comes in two flavors
* `crow::SimpleApp`
* no middle ware
* `crow::App<m1, m2>`
* uses m1, m2, etc. middleware
Some other usefule interfaces
* `bindaddr(192.168.1.144)`
* takes an IP addr to bind to
* `.port(443)`
* takes an int port to listen on
* `.multithreaded()`
* enable multithreaded request handling
* `.run()`
* Run the app
* Run is blocking, use `run_async` for non blocking
== Routes ==
Routes assign URLs to function calls. To assign a route, use the macro
`CROW_ROUTE(app, url)`
where,
* `app` is the app class to assign the route to
* `url` is the relative path is assigned to the route
* paths can take paramaters
* `/hello/<int>`
* paramaters can be
* `int`
* `uint`
* `double`
* `string`
* `path`
HTTP methods can also be changed on routes via the `.method()` call, appended
to the `CROW_ROUTE` macro.
HTTP methods include
* `crow::HTTPMethod::GET`
* `crow::HTTPMethod::PATCH`
* `crow::HTTPMethod::POST`
=== Catchall route ===