{"id":24414863,"url":"https://github.com/faustogerman/rhino","last_synced_at":"2025-12-11T21:10:18.837Z","repository":{"id":62421470,"uuid":"268218876","full_name":"faustogerman/Rhino","owner":"faustogerman","description":"Rhino 🦏 - Deno Framework for scalable APIs.","archived":false,"fork":false,"pushed_at":"2023-04-08T18:32:31.000Z","size":2139,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-26T08:42:56.686Z","etag":null,"topics":["backend","deno","http","rest-api","server"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/faustogerman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-31T05:59:37.000Z","updated_at":"2023-04-08T18:32:37.000Z","dependencies_parsed_at":"2024-11-18T14:53:26.785Z","dependency_job_id":"e21b5bc4-e996-4846-978b-f26b40337592","html_url":"https://github.com/faustogerman/Rhino","commit_stats":null,"previous_names":["faustogerman/rhino","faustotnc/rhino"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/faustogerman/Rhino","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faustogerman%2FRhino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faustogerman%2FRhino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faustogerman%2FRhino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faustogerman%2FRhino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faustogerman","download_url":"https://codeload.github.com/faustogerman/Rhino/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faustogerman%2FRhino/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27670274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-11T02:00:11.302Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","deno","http","rest-api","server"],"created_at":"2025-01-20T07:24:22.549Z","updated_at":"2025-12-11T21:10:18.788Z","avatar_url":"https://github.com/faustogerman.png","language":"TypeScript","readme":"# Rhino 🦏 - The Framework for scalable APIs.\n\n🎉 RC-2 introduced out-of-the-box support for parsing JSON and Form data from the request body, as well as the ability to send files to the client in the response body. [Check out the highlights!](https://github.com/faustotnc/Rhino/releases) 🎉\n\nRhino is an Angular-inspired framework for creating scalable REST-APIs. It provides a route-endpoint architecture that takes advantage of the many features provided by the TypeScript language. It encourages a project structure that is self-described and consistent, so that programmers within the project can collaborate seamlessly.\n\n[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/faustotnc/rhino?include_prereleases\u0026color=3d6057)](https://github.com/faustotnc/Rhino/releases)\n[![tag](https://img.shields.io/badge/deno-\u003e=1.0.0-green.svg?color=3d6057)](https://github.com/denoland/deno)\n[![tag](https://img.shields.io/badge/std-0.56.0-green.svg?color=3d6057)](https://github.com/denoland/deno)\n[![GitHub license](https://img.shields.io/github/license/faustotnc/rhino?color=bf9f32)](https://github.com/faustotnc/Rhino/blob/master/LICENSE)\n\n\nRhino comes with five different modules for strong REST-API creation:\n\n- **@RhinoServer** - *Class Decorator*: Creates a new server.\n- **RhinoRouter** - *Class*: Defines the routes and endpoints for a server.\n- **@RhinoEndpoint** - *Class Decorator*: Defines an endpoint handler.\n- **@RhinoHook** - *Class Decorator*: Defines a middleware that can be hooked to the request-response middleware pipeline.\n- **@RhinoError** - *Class Decorator*: Defines an error handler.\n\n\n\n## Hello World\n\n### Step 1) Create a Server\nCrete a file named `server.ts`, then copy and paste the following code inside it.\n``` typescript\nimport {\n    RhinoServer, OnServerListening,\n    ServerOptions, RunServers\n} from \"https://deno.land/x/rhino/mod.ts\";\n\n// The server's router (next step)\nimport { myRouter } from  './router.ts';\n\n// Creates a server\n@RhinoServer({\n    port: 3200,\n    router: myRouter\n})\nexport class myServer implements OnServerListening {\n    /** Executes once the server starts listening to requests */\n    public onListening(app: ServerOptions) {\n        console.log(`\\nListening to request made to ${app.hostname}:${app.port}`)\n    }\n}\n\n/**\n * Runs all the servers for this application.\n * (A single application can have multiple servers)\n */\nRunServers([myServer]);\n```\n\n\n\n### Step 2) Create a Router\nCreate a file named `router.ts`, then copy and paste the following code inside it.\n``` typescript\nimport { RhinoRouter } from \"https://deno.land/x/rhino/mod.ts\";\n\n// Creates a new router\nconst ROUTER = new RhinoRouter();\n\n// Endpoints (next step)\nimport { helloWorld } from \"./hello_world.endpoint.ts\";\n\n// Mounts the helloWorld endpoint to the root of the server\nROUTER.addEndpoint(helloWorld);\n\n// Exports the router\nexport const myRouter = ROUTER;\n```\n\n\n\n### Step 3) Create an Endpoint\nCreate a file named `hello_world.endpoint.ts`, then copy and paste the following code inside it.\n``` typescript\nimport {\n    RhinoEndpoint, OnEndpointCalled, RhinoRequest,\n    RhinoResponse, NextHook, NextError, HttpMethod, MIMEType\n} from \"https://deno.land/x/rhino/mod.ts\";\n\n\n@RhinoEndpoint({\n    path: \"/hello\", // The path for this endpoint\n    method: HttpMethod.GET, // This endpoint will only listen to GET requests\n})\nexport class helloWorld implements OnEndpointCalled {\n\n    // The constructor accepts the following parameters (in that order):\n    // The Request Object,\n    // The Response Object,\n    // The Next Hook function (middlewares of type \"After\"), and\n    // The Error function\n    constructor(\n        private req: RhinoRequest,\n        private res: RhinoResponse,\n        private next: NextHook,\n        private error: NextError\n    ) { }\n\n    /** Executed when this endpoint is requested */\n    public onEndpointCall() {\n        // Sets the content type, and sends data to the client\n        this.res.contentType(MIMEType.TextHTML).send(\"\u003ch1\u003eHello Rhinos 🦏!\u003c/h1\u003e\");\n    }\n}\n```\nOpen a command line and run ``$ deno run -c ./tsconfig.json --allow-net server.ts``.\n\n**NOTE:** Using Rhino requires the ``\"experimentalDecorators\": true`` in your project's tsconfig.json file.\n\nFinally, navigate to `localhost:3200/hello` to be greeted by your newly created Rhino server.\n\n\n\n## Scalability\nYou may be wondering, why so many files for a simple \"hello world\" project? The answer lies in scalability. Most real-world REST-APIs do not have a single file for all their code. Instead, the code is split into many files, folders, and sub-folders to create a robust application. Rhino takes care of all the thinking that goes behind defining a folder structure for your project by encouraging code refraction. To see an example of a simple Rhino project, visit the ``_example`` folder.\n\n\n\n**NOTE:** This project is still on its (very) early stages, and the definitions are subject to change.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaustogerman%2Frhino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaustogerman%2Frhino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaustogerman%2Frhino/lists"}