Created
October 18, 2019 23:38
-
-
Save angellandros/d6ab27b5159a3460982d54abac67c5f1 to your computer and use it in GitHub Desktop.
Sample TSOA controller
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
import { Controller, Get, Route } from 'tsoa'; | |
@Route('') | |
export class IndexController extends Controller { | |
@Get('') | |
public async index() { | |
return { msg: 'Hello World!' }; | |
} | |
@Get('/msg') | |
public msg() { | |
return { msg: 'This is a message' }; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment