boilerplate_mux 2.2.0

  • Readme
  • Changelog
  • Installing
  • 34

boilerplate_mux #

Boilerplate for jaguar_mux.

Contains a server built with Jaguar. It exposes four routes for demonstration purposes:

  1. A simple GET route
  2. A simple POST route that uses query parameters
  3. A simple JSON GET route

It also includes a sample client to test these APIs.

import 'package:jaguar/jaguar.dart';

main() async {
  final server = new Jaguar(port: 10000);

  // A simple get route
  server.get('/api/version', (_) => 0.1);

  // A simple post route
  server.post('/api/add',
      (Context ctx) => ctx.query.getInt('a') + ctx.query.getInt('b'));

  // A simple get JSON route
  server.getJson(
      '/api/info',
      (_) => {
            'server': 'Jaguar',
            'motto': 'Simple. Fast. Flexible. Extensible.',
          });

  await server.serve();
}

Changelog #

0.0.1 #

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

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


dependencies:
  boilerplate_mux: ^2.2.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

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

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

We analyzed this package on Oct 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in libraries.

Health issues and suggestions

Fix bin/client.dart. (-25 points)

Analysis of bin/client.dart failed with 1 error:

line 30 col 29: The function 'IOClient' isn't defined.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is getting outdated. (-16.99 points)

The package was last published 61 weeks ago.

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.65 <3.0.0
jaguar ^2.2.0 2.4.36
jaguar_resty ^2.6.2 2.10.14
Transitive dependencies
async 2.4.0
auth_header 2.1.4
charcode 1.1.2
client_cookie 2.2.1
collection 1.14.12
convert 2.1.1
crypto 2.1.3
http 0.12.0+2
http_parser 3.1.3
http_server 0.9.8+3
jaguar_common 2.1.4
jaguar_serializer 2.2.12
logging 0.11.3+2
meta 1.1.7
mime 0.9.6+3
path 1.6.4
path_tree 2.2.2
pedantic 1.8.0+1
source_span 1.5.5
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test ^1.3.0