vovk 1.1.2-beta.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,10 +26,13 @@ Docs: Algolia, External link icons
|
|
|
26
26
|
Vovk.ts is an extension over documented Next.js App API routes that enables you to create a REST API as easy as you can imagine.
|
|
27
27
|
</p>
|
|
28
28
|
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
29
32
|
<p align="center">
|
|
30
33
|
<a href="https://vovk.dev/">Website</a>
|
|
31
34
|
<a href="https://docs.vovk.dev/">Documentation</a>
|
|
32
|
-
<a href="https://vovk-examples.vercel.app/">Examples</a>
|
|
35
|
+
<a href="https://vovk-examples.vercel.app/">Interactive Examples</a>
|
|
33
36
|
<br />
|
|
34
37
|
<br />
|
|
35
38
|
<a href="https://github.com/finom/vovk-zod">vovk-zod</a>
|
|
@@ -42,3 +45,24 @@ Docs: Algolia, External link icons
|
|
|
42
45
|
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg" alt="TypeScript" /></a>
|
|
43
46
|
<a href="https://github.com/finom/vovk/actions/workflows/main.yml"><img src="https://github.com/finom/vovk/actions/workflows/main.yml/badge.svg" alt="Build status" /></a>
|
|
44
47
|
</p>
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
<br />
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
// /src/modules/hello/HelloController.ts
|
|
54
|
+
import { get, prefix } from 'vovk';
|
|
55
|
+
|
|
56
|
+
@prefix('hello')
|
|
57
|
+
export default class HelloController {
|
|
58
|
+
/**
|
|
59
|
+
* Return a greeting from
|
|
60
|
+
* GET /api/hello/greeting
|
|
61
|
+
*/
|
|
62
|
+
@get('greeting')
|
|
63
|
+
static getHello() {
|
|
64
|
+
return { greeting: 'Hello world!' };
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|