AstraApp class

The main entry point for an Astra application.

Constructors

AstraApp({List<Object> controllers = const [], List<Object> providers = const [], List<Middleware> middlewares = const []})

Properties

container Container
The DI container
final
controllers List<Object>
The list of controllers registered in the application.
final
hashCode int
The hash code for this object.
no setterinherited
middlewares List<Middleware>
Custom middlewares
final
openApiRegistry OpenApiRegistry
OpenAPI Registry
final
router TrieRouter
The router used by the application.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

get(String path, Function handler) → void
Manually register a route (for testing/internal use)
listen(int port, {String address = '0.0.0.0'}) Future<HttpServer>
Starts the HTTP server.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited