Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/finom/vovk
REST for Next - Transforms Next.js into a powerful and extensible REST API platform
https://github.com/finom/vovk
controller decorators nestjs nextjs nextjs13 nodejs rest-api service threading worker
Last synced: 3 months ago
JSON representation
REST for Next - Transforms Next.js into a powerful and extensible REST API platform
- Host: GitHub
- URL: https://github.com/finom/vovk
- Owner: finom
- License: mit
- Created: 2023-07-12T19:42:22.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-04-01T16:49:07.000Z (3 months ago)
- Last Synced: 2024-04-02T11:01:47.920Z (3 months ago)
- Topics: controller, decorators, nestjs, nextjs, nextjs13, nodejs, rest-api, service, threading, worker
- Language: TypeScript
- Homepage: https://vovk.dev
- Size: 4.8 MB
- Stars: 36
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- my-awesome-list - vovk - Transforms Next.js into a powerful REST API platform with RPC capabilities. | finom | 43 | (TypeScript)
- awesome - finom/vovk - RESTful RPC for Next.js - Transforms Next.js into a powerful REST API platform with RPC capabilities. (TypeScript)
- awesome-stars - finom/vovk - RESTful RPC for Next.js - Transforms Next.js into a powerful REST API platform with RPC capabilities. (TypeScript)
README
REST for Next
Transforms Next.js into a powerful and extensible REST API platform.
Made with TypeScript, inspired by NestJS.
Website
Documentation
Interactive Examples
vovk-zod
vovk-hello-world
vovk-react-native-example
Example back-end Controller Class:
```ts
import { get, prefix } from 'vovk';@prefix('hello')
export default class HelloController {
/**
* Return a greeting from
* GET /api/hello/greeting
*/
@get('greeting')
static getHello() {
return { greeting: 'Hello world!' };
}
}
```Example component that uses the auto-generated client library:
```ts
'use client';
import { useState } from 'react';
import { HelloController } from 'vovk-client';
import type { VovkClientReturnType } from 'vovk';export default function Example() {
const [
serverResponse, setServerResponse,
] = useState>();return (
<>
{
setServerResponse(
await HelloController.getHello()
);
}}
>
Get Greeting from Server
{serverResponse?.greeting}
>
);
}
```