Basic Controller Example

Basic usage of Vovk Controller.

BasicController.ts
BasicExample.tsx
1import { get, prefix } from 'vovk';
2
3@prefix('basic')
4export default class BasicController {
5 /**
6 * Return a greeting
7 */
8 @get('greeting', { cors: true })
9 static getHello() {
10 return { greeting: 'Hello world!' };
11 }
12}
1import { get, prefix } from 'vovk';
2
3@prefix('basic')
4export default class BasicController {
5 /**
6 * Return a greeting
7 */
8 @get('greeting', { cors: true })
9 static getHello() {
10 return { greeting: 'Hello world!' };
11 }
12}