utopia_framework 0.0.1 copy "utopia_framework: ^0.0.1" to clipboard
utopia_framework: ^0.0.1 copied to clipboard

A light and easy to get started with HTTP framework for Dart

Utopia Dart Framework #

NOT READY FOR PRODUCTION

Light and Fast Dart Framework to build awesome Dart applications. Inspired from Utopia PHP Framework.

⚠️ Warning! #

This library is highly volatile and heavily under development.

Getting Started #

First add the dependency in your pubspec.yaml

dependencies:
  utopia_framework:
    git: https://github.com/utopia-dart/utopia_framework

Now, in main.dart, you can

import 'dart:io';
import 'package:utopia_framework/utopia_framework.dart';

void main() async {
  final app = App();
  app
      .get('/')
      .inject('response')
      .action((Response response) {
    response.text('Hello World!');
    return response;
  });

  final address = InternetAddress.anyIPv4;
  final port = App.getEnv('PORT', 8080);
  await App.serve(app, ShelfServer(address, port), threads: 3);
  print("server started at ${address.address}:$port");
  print('press any key to exit.');
  stdin.readByteSync();
}

The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php

1
likes
125
points
1
downloads

Publisher

verified publisherappwriters.dev

Weekly Downloads

A light and easy to get started with HTTP framework for Dart

Documentation

API reference

License

MIT (license)

Dependencies

http_parser, mime, shelf, shelf_static, string_scanner, utopia_di

More

Packages that depend on utopia_framework