The most mature backend framework for Deno. Create awesome HTTP and WebSocket server as well as KVQueue workers !
Attributes
Includes Deno configuration
Repository
Current version released
2 years ago
Versions
- 2.4.1Latest
- 2.4.0
- 2.3.1
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.1
- 2.0.0
- 2.0.3-alpha
- 2.0.2-alpha
- 2.0.1-alpha
- 2.0.0-alpha
- 1.8.0
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- v1.0.0
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.4
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.0
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.1
- v0.3.0
- v0.2.4
- v0.2.3-alpha
- v0.2.2-alpha
- v0.2.1-alpha
- v0.2.0-alpha
- v0.1.2-alpha
- v0.1.1-alpha
- v0.1.0-alpha
Deno heavily inspired by Nest
Danet - A savory web framework for- Modules - exactly what you think they are.
- Controllers - To handle requests.
- Dependency Injection - Let Danet take care of instantiating stuff for you when it is the most convenient.
- AuthGuards - Handle your Authentication/Authorization. The whole App get guard, Controllers get guard, Methods get guard, and you get a Guard…
- Decorators - Modules, Controllers, Method, Body, Query Params, do more with less code !
Community
Join our discord
Docs
Documentation is available at https://savory.github.io/Danet/
It is obviously still a WIP.
Contributing
If you want to contribute, feel free ! Guidelines will be available here
How to use
If you are familiar with Nest (and if you’re not, go check it out), you will not be lost.
In this simplified example, we are building a todo-app:
Modules
@Module({
controllers: [TodoController],
injectables: [TodoService],
})
class TodoModule {}
Controllers
@Controller('todo')
class TodoController {
//todoService will be automatically injected at runtime with DI
constructor(private todoService: TodoService) {
}
@Get('')
getTodos() {
return this.todoService.getTodos();
}
@Get(':id')
getOneTodo(@Param('id') todoId: string) {
return this.todoService.getOne(todoId);
}
@Post('')
createTodo(@Body() todo) {
return this.todoService.createTodo(todo);
}
@Put('')
UpdateTodos(@Body() updatedTodos: Todo[]) {
return this.todoService.updateMany(updatedTodos);
}
@Put(':id')
UpdateOneTodo(@Param('id') todoId: string, @Body() updatedTodo: Todo) {
return this.todoService.updateOneById(todoId, updatedTodo);
}
}
Services
//By default, injectables are singleton
@Injectable()
class TodoService {
//create your own DatabaseService to interact with db, it will be injected
constructor(databaseService: DatabaseService) {
}
getTodos() {
this.databaseService.getMany();
}
// implement your logic
}
Run your app
const optionalPort = 4000;
const app = new DanetApplication();
await app.init(TodoModule);
await app.listen(optionalPort); //default to 3000