|
|
|
|
|
by ashtonjamesd
250 days ago
|
|
Hi, sorry maybe I should've added a comment for that. The 'appRoute' is a macro that expands to a function signature. The macro is: '#define appRoute(name) HttpResponse name(AppContext ctx)' and the parameter I passed as 'home' is expanded into the function name. The reason is because all controller function signatures are the same, so just writing 'appRoute' allows the developer to save time writing endpoints! It is a tradeoff between readability and development speed. And one of the ideas behind the framework is succint and minimal code. |
|