elastic 0.0.2

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • new51

Elastic

Elastic leverages the powerful features of the Dart programming language and fuses them with functional concepts to provide a lightweight fabric for building fast and performant web applications.

Example

Using the Elastic application interface, you can get your web application up and running in no time. Here's a simple example.

import 'dart:async';

import 'package:elastic/elastic.dart';

class Example extends Middleware {
  @override
  Future<Context> resolve(Context context, Resolver next) async => context
    .setResponse(Response.text('Hello, Elastic!'));
}

Future main() async => listen(middleware: [
  Example()
]);

To run this example, simply paste the code into a file and let the Dart SDK evaluate it. You should then be able to fire up your favorite browser and navigate to localhost:9000 to see the example application in action.

Changelog

0.0.2

  • Add setRequest and setResponse methods to the Context class.
  • Fix some minor typos in readme file and update the example.

0.0.1

  • Initial release.

Use this package as a library

1. Depend on it

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


dependencies:
  elastic: ^0.0.2

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.

3. Import it

Now in your Dart code, you can use:


import 'package:elastic/elastic.dart';
  
Version Uploaded Documentation Archive
0.0.2 Oct 23, 2018 Go to the documentation of elastic 0.0.2 Download elastic 0.0.2 archive
0.0.1 Oct 23, 2018 Go to the documentation of elastic 0.0.1 Download elastic 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
18
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
51
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, other

Primary library: package:elastic/elastic.dart with components: io.

Health suggestions

Format lib/src/context.dart.

Run dartfmt to format lib/src/context.dart.

Format lib/src/middleware.dart.

Run dartfmt to format lib/src/middleware.dart.

Format lib/src/request.dart.

Run dartfmt to format lib/src/request.dart.

Format lib/src/response.dart.

Run dartfmt to format lib/src/response.dart.

Format lib/src/server.dart.

Run dartfmt to format lib/src/server.dart.

Maintenance issues and suggestions

Homepage does not exists. (-20 points)

We were unable to access https://github.com/dartfulio/elastic at the time of the analysis.

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 elastic.dart.

Package is pre-v0.1 release. (-10 points)

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
built_collection ^4.0.0 4.0.0
Transitive dependencies
collection 1.14.11
matcher 0.12.4
meta 1.1.6
path 1.6.2
quiver 2.0.1
stack_trace 1.9.3