jaguar 0.6.9 copy "jaguar: ^0.6.9" to clipboard
jaguar: ^0.6.9 copied to clipboard

outdatedDart 1 only

Jaguar is a production ready server framework built for **speed, simplicity and extensiblity**

Build Status

Jaguar #

Jaguar is a production ready server framework built for speed, simplicity and extensiblity

Advantages of Jaguar #

  1. Batteries included
    1. Database
      1. Fluent query builder
      2. ORM
      3. Migration support
      4. Various databases support
        1. Mongo
        2. PostgreSQL (Query)
        3. MySQL (Query)
        4. OracleDB
        5. MS SQL
    2. Authentication and Authorization
    3. OAuth
    4. Session management
  2. Build your routes the way you prefer
    1. Controller based
      1. Reflect
      2. Generate
    2. Mux based
  3. Extensible interceptor infrastructure
  4. Extensive respository of examples
    1. Annotation based
    2. Reflection based
    3. Mux based
    4. MongoDB
    5. PostgreSQL
    6. MySQL
    7. Upload files using Jaguar

Usage #

Swiftly build REST Api #

Below example shows how to add routes to Jaguar.dart server.

@Api(path: '/api')
class ExampleApi {
  /// This route shows how to write JSON response in jaguar.dart.
  /// [Response] class has a static constructor method called [json]. This
  /// method encodes the given Dart built-in object to JSON string
  @Get(path: '/hello')
  Response<String> sayHello(Context ctx) => Response.json({
        "greeting": "Hello",
      });


  /// This route shows how to read JSON request and write JSON response in
  /// jaguar.dart.
  @Post(path: '/math')
  Future<Response<String>> math(Context ctx) async {
    /// [bodyAsJsonMap] method on [Request] object can be used to decode JSON
    /// body of the request into Dart built-in object
    final Map body = await ctx.req.bodyAsJsonMap();
    final int a = body['a'];
    final int b = body['b'];

    return Response.json({
      'addition': a + b,
      'subtraction': a - b,
      'multiplication': a * b,
      'division': a ~/ b,
    });
  }
}

JSON serialization with little effort #

TODO

Connect to MongoDB #

TODO

Connect to PostgreSQL #

TODO

Add user authentication #

TODO

Join us on Gitter #

58
likes
0
pub points
88%
popularity

Publisher

unverified uploader

Jaguar is a production ready server framework built for **speed, simplicity and extensiblity**

Homepage

License

unknown (LICENSE)

Dependencies

args, collection, http_server, intl, logging, mime, mustache, quiver_hashcode, stack_trace, yaml

More

Packages that depend on jaguar