Created
October 19, 2020 04:47
-
-
Save Cylix/89280b1bacc0d7fcd1b86082f3be7acb to your computer and use it in GitHub Desktop.
Reflection in C++14 - Routes Configuration in C++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.add(Route{ HTTP::Method::GET, "/articles" }, &articles_controller::index); | |
router.add(Route{ HTTP::Method::POST, "/articles" }, &articles_controller::create); | |
router.add(Route{ HTTP::Method::GET, "/articles/:id" }, &articles_controller::show); | |
router.add(Route{ HTTP::Method::PUT, "/articles/:id" }, &articles_controller::update); | |
router.add(Route{ HTTP::Method::DELETE, "/articles/:id" }, &articles_controller::destroy); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment