astra 1.0.0-dev.147 copy "astra: ^1.0.0-dev.147" to clipboard
astra: ^1.0.0-dev.147 copied to clipboard

unlisted

Astra is Shelf web server adapter and application framework.

Pub Package License

Astra is Shelf web server adapter and application framework. Multi-isolate support and hot reload/restart. Inspired by uvicorn and starlette.

WORK IN PROGRESS

ToDo #

  • Verbose output 🔥
  • More API Documentation 🔥
  • Logging 🔥
  • Tests 🔥
  • Environment variables & configuration file
  • ...

Experimenting #

  • Shelf Request/Response based HttpServer alternatives:
    • dart:io Socket (without HttpRequest/HttpResponse, ...) 🤔
    • dart:ffi and Go/Rust web server adapter 🤔
    • ...
  • HTTP/2 🤔
  • ...

Quickstart #

Create an application in lib/[package].dart file

import 'dart:io';

import 'package:astra/core.dart';

Response application(Request request) {
  return Response.ok('hello world!');
}

and bin/main.dart file

import 'package:astra/serve.dart';
import 'package:example/example.dart';

Future<void> main() async {
  var server = await application.serve('localhost', 8080);
  print('Serving at ${server.url} ...');
}

to run application.

1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Astra is Shelf web server adapter and application framework.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

collection, http, http_parser, meta, shelf, stack_trace, stream_channel

More

Packages that depend on astra