Skip to content

Instantly share code, notes, and snippets.

@marcus-sa
Last active April 17, 2018 18:12
Show Gist options
  • Save marcus-sa/84b3f75649eb906b0e86c9df5000543f to your computer and use it in GitHub Desktop.
Save marcus-sa/84b3f75649eb906b0e86c9df5000543f to your computer and use it in GitHub Desktop.
Titan controller & routing example
import { Route } from 'Titan/Http/Routing'
@Route.group('threads')
export class ThreadController {
@Route.get(':id', { name: 'thread-comment' })
async comment({ request, response, id }) {
// ...
Route.generate('thread-comment', { id: 1 })
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment