Odi
  • Read Me
  • Introduction
    • Motivation
    • Core Concepts
  • Fundamentals
    • Getting Started
    • Controller
    • DTO
    • Service
    • Dependency Injection
    • Authentication
    • Web Sockets
    • Database
      • Settings
      • Repository
      • Transactions
    • Middleware
Powered by GitBook
On this page
  • Odi
  • Example

Was this helpful?

Read Me

NextIntroduction

Last updated 6 years ago

Was this helpful?

Odi

TypeScript framework for creating enterprise-grade (web) applications with simple and minimalistic API, that allows you to focus on business logic. Based on declarative and imperative programming, inspiried by / .

Odi provides feature set for creation of easy supportable and scalable web applications.

Features Overview:

For future updates check

Example

import { Controller, IController, Post, Get, Autowired } from "odi";
import { TodoService } from "./todo.service";
import { TodoDTO } from "./todo.dto";

@Controller()
export class TodoController extends IController {

   @Autowired()
   todoService: TodoService;

   @Get index() {
       return `Hello, ${this.request.ip}`;
   }

   @Post async save(toDo: TodoDTO) {
       await this.todoService.save(toDo);
   }
   
   @Get async '/:id' (id: string) {
       const todo = await this.todoService.find(id);
       
       if(!todo) 
         throw NotFound;
       
       return todo;
   }
}
ASP.NET
Spring
Roadmap
Getting Started