Created
January 13, 2020 15:37
-
-
Save taylortom/ffe22b9d6bdbd57b761473713ae1ed6d to your computer and use it in GitHub Desktop.
Example route handler config
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
{ | |
"documentation": { | |
"enable": true | |
}, | |
"api": { | |
"name": "courses", | |
"root": "/courses", | |
"middleware": "./lib/middleware.js", | |
"routeHandlers": "./lib/routes.js", | |
"routes": [ | |
{ | |
"route": "/:id", | |
"methods": ["post"], | |
"handler": "createCourse", | |
"auth": { | |
"scopes": "???" | |
} | |
}, | |
{ | |
"route": "/:id?", | |
"methods": ["get"], | |
"handler": "getCourse" | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment