{"id":13990853,"url":"https://github.com/ParallelTask/dinoloop","last_synced_at":"2025-07-22T13:31:50.471Z","repository":{"id":53711274,"uuid":"134241471","full_name":"ParallelTask/dinoloop","owner":"ParallelTask","description":"Rest API framework built on top of expressjs powered by Typescript.","archived":false,"fork":false,"pushed_at":"2024-04-18T04:42:36.000Z","size":338,"stargazers_count":134,"open_issues_count":0,"forks_count":16,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-09T13:17:55.522Z","etag":null,"topics":["dependency-injection","expressjs","inversifyjs","moq","nodejs","oops","rest-api","solid-principles","typescript"],"latest_commit_sha":null,"homepage":"https://unpkg.com/dinoloop-docs@0.0.6/index.html","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/ParallelTask.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2018-05-21T08:35:01.000Z","updated_at":"2024-03-13T22:41:05.000Z","dependencies_parsed_at":"2024-08-09T13:21:45.482Z","dependency_job_id":null,"html_url":"https://github.com/ParallelTask/dinoloop","commit_stats":{"total_commits":75,"total_committers":5,"mean_commits":15.0,"dds":"0.10666666666666669","last_synced_commit":"6a269d9c7564751cf94843f37e10b7853638fc8f"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParallelTask%2Fdinoloop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParallelTask%2Fdinoloop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParallelTask%2Fdinoloop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParallelTask%2Fdinoloop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ParallelTask","download_url":"https://codeload.github.com/ParallelTask/dinoloop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227099036,"owners_count":17730697,"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","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":["dependency-injection","expressjs","inversifyjs","moq","nodejs","oops","rest-api","solid-principles","typescript"],"created_at":"2024-08-09T13:03:24.384Z","updated_at":"2024-11-29T10:31:59.590Z","avatar_url":"https://github.com/ParallelTask.png","language":"TypeScript","readme":"[![build status](https://api.travis-ci.org/ParallelTask/dinoloop.svg?branch=master)](https://travis-ci.org/ParallelTask/dinoloop/)\n[![npm version](https://img.shields.io/npm/v/dinoloop.svg)](https://www.npmjs.com/package/dinoloop)\n[![downloads](https://img.shields.io/npm/dm/dinoloop.svg)](https://www.npmjs.com/package/dinoloop)\n[![Known Vulnerabilities](https://snyk.io/test/github/ParallelTask/dinoloop/badge.svg)](https://snyk.io/test/github/ParallelTask/dinoloop)\n\n### Important\n\nPlease direct the issues and feature requests to [Github](https://github.com/ParallelTask/dinoloop/issues).\n\n### Projects built using dinoloop\n\n- [dinache](https://github.com/dinoloop/dinache)\n\n# Dinoloop\n\nDinoloop is a REST API library for building scalable Node.js server-side applications powered by TypeScript. Dinoloop uses [Expressjs](https://expressjs.com/) and has been designed with a simple motto - to reuse similar design patterns of C#/JAVA (OOP practices, SOLID principles and MVC architecture) in Node.js. Dinoloop adds syntactic sugar to Expressjs empowering OOP programmers to easily switch to Node.js without the steep learning curve.\n\n## Why Dinoloop?\n\nIn the same way express.js does not abstract you from Node.js, Dinoloop does not abstract you from express.js (you have complete access to Node.js and express.js). You are free to use/mix the Node.js and express.js API in your development. Dinoloop is a library more than a framework. You can develop an entire application in Dinoloop, part of an application, or gradually migrate an existing express.js application to Dinoloop. The first principle of Dinoloop is to provide an architecture to developers and not to create a complete bundled framework.\n\n## Prerequisites\n\n- Node 8.10.x or higher\n- Express 4.3.x or higher\n- Typescript 2.2.x or higher\n\n## Install\n\n```bash\nnpm install dinoloop\n```\n\n## Quickstart\n\nWithout Dependency Injection framework\n\n```bash\ngit clone https://github.com/ParallelTask/dinoloop-starter.git\ncd dinoloop-starter\nnpm install\nnpm start\n```\n\nWith Dependency Injection framework\n\n```bash\ngit clone https://github.com/ParallelTask/dinoloop-inversify-starter.git\ncd dinoloop-inversify-starter\nnpm install\nnpm start\n```\n\nNavigate to [http:localhost:8088/api/home/get](http:localhost:8088/api/home/get) in browser\n\n## Principles\n\nDinoloop has been designed from the start to support gradual adoption so you can use as little or as much you need. Perhaps you only want to develop some REST APIs using Dinoloop and others with Expressjs. In this section, we show how to create a Dinoloop REST API with an existing or newly created Express app.\n\n#### Step 1: Add HomeController (file: home.controller.ts)\n\n```typescript\nimport { ApiController, Controller, HttpGet } from \"dinoloop\";\n\n@Controller(\"/home\")\nexport class HomeController extends ApiController {\n  @HttpGet(\"/get\")\n  get(): string {\n    return \"Hello World!\";\n  }\n}\n```\n\n#### Step 2: Mount dinoloop and bind to express instance (file: app.ts)\n\n```typescript\nconst app = express();\napp.use(bodyParser.json());\n\n// Dino requires express instance and base-uri to which dino will be mounted\nconst dino = new Dino(app, \"/api\");\n\n// Dino requires express router too\ndino.useRouter(() =\u003e express.Router());\n\n// Register controller\ndino.registerController(HomeController);\n\n// Bind dino to express\ndino.bind();\n\n// These are your normal express endpoints\napp.get(\"/home\", (req, res, next) =\u003e {\n  res.status(200).json(\"Hello World!\");\n});\n\napp.get(\"/about\", (req, res, next) =\u003e {\n  res.status(200).json(\"Hello World!\");\n});\n\n// Start your express app\napp.listen(8088, () =\u003e console.log(\"Server started on port 8088\"));\n```\n\nDinoloop is mounted on `/api` and all of its controller routes/endpoints which are registered with dinoloop are also mounted on `/api`. Dinoloop will handle those requests which are mounted on `/api` i.e. `/api/home/get`, the other end points `/home` and `/about` which are created by expressjs are not handled by dinoloop, this way you can slowly migrate your existing express app to dinoloop or you can start writing your new REST APIs using dinoloop in combination with expressjs.\n\n## Features\n\n- Super easy set-up. The Dinoloop team provides a recommended starter project so you can start building right away. We want our developers to have the freedom to choose DI or not. You can develop APIs without using DI framework.\n\n  - Without DI framework [dinoloop-starter-without-DI](https://github.com/ParallelTask/dinoloop-starter)\n  - With DI framework [dinoloop-starter-with-DI](https://github.com/ParallelTask/dinoloop-inversify-starter)\n\n- Supports Expressjs middlewares with a completely Expressjs driven library.\n- Heavily influenced by MVC pattern.\n- Configurable Dependency injection framework. Choose your favorite DI framework [InversifyJs](http://inversify.io/) and [more](https://www.npmjs.com/search?q=DI) or build one of your own.\n- Proper isolation of controllers and services for better unit-testing.\n- Controller middlewares - ActionFilters, ExceptionFilters, ResultFilters with Robust sync/async (handles async/await pattern)\n- Application middlewares - AppStart, RequestStart, RequestEnd and ServerError with Robust sync/async (handles async/await pattern).\n- UserIdentity principal across requests. Still an experimental feature.\n\n## Documentation\n\n- Visit the [docs](https://unpkg.com/dinoloop-docs@0.0.6/index.html)\n\n## Philosophy\n\nDinoloop lets users freely upgrade/downgrade Expressjs. Installing Dinoloop won't install Expressjs. You can install your own version of\nExpress. All you have to provide is the Express app and router instances to Dinoloop.\n\n#### Why Expressjs is not bundled as dependency?\n\nDinoloop is an Expressjs library with the core principles centered around being a light-weight and pluggable architecture. We use the same principles of libraries to work with targeted versions. Here is a page that describes [version compatibility](http://dinoloop.com/#/docs/versions).\n\n## Motivation\n\nTypescript (_Javascript now_) supports object oriented programming, these features are great with SOLID design principles. Dinoloop has simple motto, to apply SOLID principles and reuse similar coding skills of Java and C# in Nodejs.\n\n## Contribute\n\nWant to file a bug, contribute some code, or improve documentation? Excellent! Read up on our [CONTRIBUTING.md](https://github.com/ParallelTask/dinoloop/blob/master/CONTRIBUTING.md)\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FParallelTask%2Fdinoloop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FParallelTask%2Fdinoloop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FParallelTask%2Fdinoloop/lists"}