boilerplate_mux 2.2.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 37

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 packages get

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

Version Uploaded Documentation Archive
2.2.0 Aug 15, 2018 Go to the documentation of boilerplate_mux 2.2.0 Download boilerplate_mux 2.2.0 archive
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]
70
Overall:
Weighted score of the above. [more]
37
Learn more about scoring.

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

  • Dart: 2.0.0
  • pana: 0.12.6

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 description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use boilerplate_mux.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.65 <3.0.0
jaguar ^2.2.0 2.4.10
jaguar_resty ^2.6.2 2.8.18
Transitive dependencies
async 2.0.8
auth_header 2.1.2
charcode 1.1.2
client_cookie 2.1.6
collection 1.14.11
convert 2.0.2
crypto 2.0.6
http 0.12.0
http_parser 3.1.3
http_server 0.9.8+1
jaguar_common 2.1.4
logging 0.11.3+2
meta 1.1.6
mime 0.9.6+2
path 1.6.2
path_tree 2.2.2
source_span 1.4.1
stack_trace 1.9.3
string_scanner 1.0.4
typed_data 1.1.6
Dev dependencies
test ^1.3.0