Odi
Search…
Read Me

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 ASP.NET / Spring.
Odi provides feature set for creation of easy supportable and scalable web applications.
Features Overview:
  • MVC
  • Full-typed DI / IoT
  • Authentication
  • WebSockets
  • TypeORM integration
  • GraphQL
  • GRPC
  • CLI
  • AOP
  • SSR
For future updates check Roadmap

Example

1
import { Controller, IController, Post, Get, Autowired } from "odi";
2
import { TodoService } from "./todo.service";
3
import { TodoDTO } from "./todo.dto";
4
5
@Controller()
6
export class TodoController extends IController {
7
8
@Autowired()
9
todoService: TodoService;
10
11
@Get index() {
12
return `Hello, ${this.request.ip}`;
13
}
14
15
@Post async save(toDo: TodoDTO) {
16
await this.todoService.save(toDo);
17
}
18
19
@Get async '/:id' (id: string) {
20
const todo = await this.todoService.find(id);
21
22
if(!todo)
23
throw NotFound;
24
25
return todo;
26
}
27
}
Copied!
Last modified 2yr ago
Copy link
Contents
Odi
Example