Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/barbarbar338/sidra
⚔️ Sidra offers you many decorators for you to use with the Cloudflare Workers.
https://github.com/barbarbar338/sidra
api api-builder application-programming-interface cloudflare cloudflare-worker cloudflare-workers controller decorator decorator-framework decorators reastapi rest-api sidra ts typescript worker workers
Last synced: 23 days ago
JSON representation
⚔️ Sidra offers you many decorators for you to use with the Cloudflare Workers.
- Host: GitHub
- URL: https://github.com/barbarbar338/sidra
- Owner: barbarbar338
- License: gpl-3.0
- Created: 2020-12-21T17:52:14.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-09T13:39:59.000Z (almost 2 years ago)
- Last Synced: 2024-05-01T16:53:14.284Z (7 months ago)
- Topics: api, api-builder, application-programming-interface, cloudflare, cloudflare-worker, cloudflare-workers, controller, decorator, decorator-framework, decorators, reastapi, rest-api, sidra, ts, typescript, worker, workers
- Language: TypeScript
- Homepage: https://barbarbar338.github.io/sidra/
- Size: 514 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Banner](https://raw.githubusercontent.com/barbarbar338/sidra/main/assets/banner.png)
[![build](https://img.shields.io/github/workflow/status/barbarbar338/sidra/Build%20and%20Test?logo=github&style=for-the-badge)](https://github.com/barbarbar338/sidra)
[![supportServer](https://img.shields.io/discord/711995199945179187?color=7289DA&label=Support&logo=discord&style=for-the-badge)](https://discord.gg/BjEJFwh)
[![totalDownloads](https://img.shields.io/npm/dt/sidra?color=CC3534&logo=npm&style=for-the-badge)](http://npmjs.com/sidra)
[![weeklyDownloads](https://img.shields.io/npm/dw/sidra?color=CC3534&logo=npm&style=for-the-badge)](http://npmjs.com/sidra)
[![version](https://img.shields.io/npm/v/sidra?color=red&label=Version&logo=npm&style=for-the-badge)](http://npmjs.com/sidra)
[![stars](https://img.shields.io/github/stars/barbarbar338/sidra?color=yellow&logo=github&style=for-the-badge)](https://github.com/barbarbar338/sidra)
[![license](https://img.shields.io/github/license/barbarbar338/sidra?logo=github&style=for-the-badge)](https://github.com/barbarbar338/sidra)## ⚔️ SidraJS
Sidra offers you many [decorators](https://stackoverflow.com/tags/javascript-decorators/info) for you to use with the [Cloudflare Workers](https://workers.cloudflare.com/).
TypeScript definitions are built in.
## Installation
- Run
```
$ npm install sidra
```
or
```
$ yarn add sidra
```## Docs
https://barbarbar338.github.io/sidra/
## Examples
See https://github.com/barbarbar338/sidra-template
```ts
import { type APIRes, Controller, Get, Handle, HTTPStatus } from "sidra";@Controller()
class MyController {
@Get()
get(): APIRes {
return {
data: "Hello World",
message: "Hello World",
statusCode: HTTPStatus.OK,
};
}
}const handler = Handle([MyController]);
addEventListener("fetch", (event) => {
event.respondWith(handler(event.request));
});
```