bliss 0.2.0 copy "bliss: ^0.2.0" to clipboard
bliss: ^0.2.0 copied to clipboard

outdatedDart 1 only

An easy to learn server side framework for Dart.

Bliss #

An easy to learn server side framework for Dart.

Purpose #

The purpose of this package is to be used internally at Indecks, but to also be extendable enough to be used in other projects. It can be used for serving static files and/or handling dynamic requests.

Usage #

A simple use case example:

import 'package:bliss/bliss.dart';

main() {
  
  Server server = new Server()
    ..setStaticHandler(
        'web',
        defaults: ['index.html'])

    ..addHandler('GET', '/api/user/:id', (Map data) {

      Map user = {};
      // query database with `data['id']` and assign it to `user`
      return user;

    })

    ..addHandler('POST', '/api/post', (Map postData, HttpRequest request) async {

      // store `postData` into database
      // add cookie to `request`

    })

    ..start();
}

Planned Features #

  • SSL support
  • Define specific codec for request payloads
  • WebSocket handlers

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Contribute #

Feel free to fork and make a pull request. Please stick to the Dart Style Guide

0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

An easy to learn server side framework for Dart.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

mime, path

More

Packages that depend on bliss