Dartness is a dart framework for building efficient and scalable server-side applications.
Dartness is a framework for building efficient, scalable dart server-side applications. It provides an easy and quick way to develop modern standalone server.
Under the hood, Dartness makes use of shelf.
Inspired by Spring Boot and Nest frameworks
The following goals are the main objectives that Dartness needs to provide and why it was designed for:
- 🛠 Full stack integration with flutter or other dart front end frameworks
- 🤹♀️🤹♂️ Easy and understandable for people coming from other kind of technology as Spring Boot and NestJS
- ✏ Simplicity, it should be easy to know why and how to use every functionality
- 👨💻👩💻 Community empowered, where the community should be able to understand and maintain the dartness project by their own
You can find different examples if you prefer to understand the code by yourself in the /examples folder.
Install Dart SDK version >=3.0.0
$ dart --version
Dart SDK version: 3.0.0 (stable)
You can check the documentation at dartness docs
$ dart create -t console your_project_name
dependencies:
dartness_server: ^0.7.0
dev_dependencies:
build_runner: ^2.2.0
dartness_generator: ^0.7.2
@Application(
module: Module(
metadata: ModuleMetadata(
controllers: [],
providers: [],
exports: [],
imports: [],
),
),
options: DartnessApplicationOptions(
port: int.fromEnvironment(
'port',
defaultValue: 8080,
),
),
)
class App {}
$ dart run build_runner build
void main(List<String> args) async {
await App().init();
}
$ dart run bin/main.dart
Server listening on port 3000
You can run the example with the Dart SDK like this:
$ dart run example/main.dart
Server listening on port 3000
- HTTP
- Controllers
Bind annotationsHeaderBodyParamQuery
MiddlewareInterceptor- Websockets
- Controllers
ExceptionsException Handler
- Security
- Roles
- CORS
Dependency InjectionInjectable
- Scheduling
- Annotation
- Database
- ORM
- Repository
- Testing
- CLI