embla_trestle 0.1.2

Trestle bootstrapper for Embla

Usage #

import 'package:embla/http.dart';
import 'package:embla_trestle/embla_trestle.dart';

export 'package:embla/bootstrap.dart';

get embla => [
  new DatabaseBootstrapper(
    // You can choose between multiple drivers. Check out the Trestle readme.
    driver: new MySqlDriver(database: 'my_database')

  new HttpBootstrapper(pipeline: pipe(
    handler((Repository<Post> posts) {
      return posts.where((post) => post.id > 10);

class Post extends Model {
  @field String title;
  @field String body;

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  embla_trestle: ^0.1.2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:embla_trestle/embla_trestle.dart';
Awaiting analysis to complete.