jaguar_mux 0.5.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 50

DEPREICATED: Mux is now integrated into jaguar package

jaguar_mux

An isomorphic fluent route muxer for Jaguar

Example

import 'package:jaguar/jaguar.dart';

main() async {
  final server = new Jaguar();

  // Get version route
  server.get('/api/version', (Context ctx) => 0.1);

  // Get info route
  server.get(
      '/api/info',
      (Context ctx) => Response.json({
            'name': 'jaguar',
            'motto': 'Speed. Simplicity. Extensiblity.',
            'degree of awesomeness': 'infinity!',
          }));

  // Shows show to decode JSON body from the request
  server.post('/api/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,
    });
  });

  await server.serve();
}

Changelog

0.0.1

  • Route
  • Group
  • Interceptor
  • Input injection

0.0.3

  • Added type conversion for query parameters and path variables

1. Depend on it

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


dependencies:
  jaguar_mux: "^0.5.1"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:jaguar_mux/jaguar_mux.dart';
        
Version Uploaded Documentation Archive
0.5.1 Jul 12, 2017 Go to the documentation of jaguar_mux 0.5.1 Download jaguar_mux 0.5.1 archive
0.5.0 Jun 6, 2017 Go to the documentation of jaguar_mux 0.5.0 Download jaguar_mux 0.5.0 archive
0.4.0 Feb 19, 2017 Go to the documentation of jaguar_mux 0.4.0 Download jaguar_mux 0.4.0 archive
0.3.0 Feb 6, 2017 Go to the documentation of jaguar_mux 0.3.0 Download jaguar_mux 0.3.0 archive
0.2.2 Feb 5, 2017 Go to the documentation of jaguar_mux 0.2.2 Download jaguar_mux 0.2.2 archive
0.2.1 Feb 2, 2017 Go to the documentation of jaguar_mux 0.2.1 Download jaguar_mux 0.2.1 archive
0.2.0 Jan 22, 2017 Go to the documentation of jaguar_mux 0.2.0 Download jaguar_mux 0.2.0 archive
0.0.3 Jan 15, 2017 Go to the documentation of jaguar_mux 0.0.3 Download jaguar_mux 0.0.3 archive
0.0.2 Jan 15, 2017 Go to the documentation of jaguar_mux 0.0.2 Download jaguar_mux 0.0.2 archive
0.0.1 Jan 14, 2017 Go to the documentation of jaguar_mux 0.0.1 Download jaguar_mux 0.0.1 archive

Analysis

We analyzed this package on Apr 9, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.46.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
50
Learn more about scoring.

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:jaguar_mux/jaguar_mux.dart.

Suggestions

  • Fix .analysis_options.

    We were unable to parse .analysis_options.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use jaguar_mux.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

  • Enable strong mode analysis.

    Strong mode helps you to detect bugs and potential issues earlier.Start your analysis_options.yaml file with the following:

    analyzer:
      strong-mode: true
    

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0
jaguar >=0.5.2 <0.6.0 0.5.11 1.3.11
jaguar_reflect >=0.5.0 <0.6.0 0.5.2 1.3.2
Transitive dependencies
args 0.13.7 1.4.1
charcode 1.1.1
collection 1.14.9
http_server 0.9.7
intl 0.14.0 0.15.4
logging 0.11.3+1
matcher 0.12.1+4
meta 1.1.2
mime 0.9.6
mustache 0.2.5+1 1.0.0
path 1.5.1
quiver 0.29.0+1
quiver_hashcode 1.0.0
source_span 1.4.0
stack_trace 1.9.2
string_scanner 1.0.2
yaml 2.1.13
Dev dependencies
http >=0.11.3+9 <0.12.0