An easily-extensible web server framework in Dart.

Typedefs

AngelConfigurer(AngelBase app) → Future

A function that configures an AngelBase server in some way.

AngelErrorHandler(AngelHttpException err, RequestContext req, ResponseContext res) → Future

Handles an AngelHttpException.

HookedServiceEventListener(HookedServiceEvent event) → dynamic

Triggered on a hooked service event.

RequestHandler(RequestContext req, ResponseContext res) → Future

A function that receives an incoming RequestContext and responds to it.

RequestMiddleware(RequestContext req, ResponseContext res) → Future<bool>

A function that intercepts a request and determines whether handling of it should continue.

ResponseSerializer(data) → String

Serializes response data into a String.

ServerGenerator(InternetAddress address, int port) → Future<HttpServer>

A function that binds an Angel server to an Internet address and port.

ViewGenerator(String path, [ Map data ]) → Future<String>

A function that asynchronously generates a view from the given path and data.

Functions

createDynamicHandler(handler, { Iterable<String> optional: const [] }) RequestHandler

Shortcut for calling preInject, and then handleContained.

handleContained(handler, InjectionRequest injection) RequestHandler

Handles a request with a DI-enabled handler.

preInject(Function handler) InjectionRequest

Predetermines what needs to be injected for a handler to run.

waterfall(List handlers) RequestMiddleware

Sequentially runs a list of handlers of middleware, and breaks if any does not return true. Works well with Router.chain.

Classes

Angel

A powerful real-time/REST/MVC server class.

AngelBase

Base class for Angel servers. Do not bother extending this.

AngelFatalError

Thrown whenever Angel completely fails to respond to a request.

AngelMiddleware

AngelPlugin

BaseMiddleware

Container

Controller

Supports grouping routes with shared functionality.

Expose

Exposes a Controller to the Internet.

Extensible

Supports accessing members of a Map as though they were actual members.

Hooked

Annotation to set a service up to release hooks on every action.

HookedService

Wraps another service in a service that broadcasts events on actions.

HookedServiceEvent

Fired when a hooked service is invoked.

HookedServiceEventDispatcher

Can be listened to, but events may be canceled.

Hooks

Attaches hooks to a HookedService.

InjectionRequest

Contains a list of the data required for a DI-enabled method to run.

MemoryModel

Represents data that can be serialized into a MemoryService;

MemoryService

An in-memory Service.

Middleware

Annotation to map middleware onto a handler.

MiddlewarePipeline

A chain of arbitrary handlers obtained by routing a path.

Providers

Indicates how the service was accessed.

RequestContext

A convenience wrapper around an incoming HTTP request.

ResponseContext

A convenience wrapper around an outgoing HTTP request.

Routable

A routable server that can handle dynamic requests.

Route

Represents a virtual location within an application.

Router

An abstraction over complex Route trees. Use this instead of the raw API. :)

RoutingResult

Represents a complex result of navigating to a path.

Service

A front-facing interface that can present data to and operate on data on behalf of the user.

SymlinkRoute

Placeholder Route to serve as a symbolic link to a mounted Router.

Exceptions / Errors

AngelHttpException

Basically the same as feathers-errors.

ContainerException

An Exception thrown when an instantiation failed. It is thrown, caught and rethrown to that we can see the stack of failing instantiations.

RoutingException

Represents an error in route configuration or navigation.