Skip to content

Instantly share code, notes, and snippets.

@taylortom
Created January 13, 2020 15:37
Show Gist options
  • Save taylortom/ffe22b9d6bdbd57b761473713ae1ed6d to your computer and use it in GitHub Desktop.
Save taylortom/ffe22b9d6bdbd57b761473713ae1ed6d to your computer and use it in GitHub Desktop.
Example route handler config
{
"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