Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
joeconwaystk authored Jun 29, 2017
1 parent f140cfb commit 6c138ef
Showing 1 changed file with 5 additions and 38 deletions.
43 changes: 5 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

[![Gitter](https://badges.gitter.im/dart-lang/server.svg)](https://gitter.im/dart-lang/server?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

Aqueduct is a server-side framework for building and deploying REST applications. It is written in Dart. Its goal is to provide an integrated, consistently styled API.
Aqueduct is a server-side framework for building and deploying multi-threaded REST applications. It is written in Dart and targets the Dart VM. Its goal is to provide an integrated, consistently styled API. If this is your first time viewing Aqueduct, check out [the tour](https://aqueduct.io/docs/tour/).

The framework contains behavior for routing and authorizing HTTP requests, persisting data in PostgreSQL, testing, and more.
The framework contains behavior for routing, OAuth 2.0, a PostgreSQL ORM, testing, and more.

The `aqueduct` command-line tool serves applications, manages database schemas and OAuth 2.0 clients, and generates OpenAPI specifications.

Aqueduct is well-tested, documented and adheres to semantic versioning.
In-depth documentation is available [here](https://aqueduct.io/docs).

## Getting Started

Expand All @@ -25,45 +25,12 @@ Aqueduct is well-tested, documented and adheres to semantic versioning.

Open the project directory in an [IntelliJ IDE](https://www.jetbrains.com/idea/download/), [Atom](https://atom.io) or [Visual Studio Code](https://code.visualstudio.com). All three IDEs have a Dart plugin.

## Tutorials and Documentation
## Tutorials, Documentation and Examples

Step-by-step tutorials for beginners are available [here](https://aqueduct.io/docs/tut/getting-started).

You can find the API reference [here](https://www.dartdocs.org/documentation/aqueduct/latest) or you can install it in [Dash](https://kapeli.com/docsets#dartdoc).

You can find in-depth and conceptual guides [here](https://aqueduct.io/docs/).

## An Example

The only requirement of an Aqueduct application is that it contains a single [RequestSink](https://aqueduct.io/docs/http/request_sink/) subclass. The example application below exposes `POST /notes`, `GET /notes`, `GET /notes/:id`, `PUT /notes/:id` and `DELETE /notes/:id` and stores data in a PostgreSQL database.

```dart
import 'package:aqueduct/aqueduct.dart';
class AppRequestSink extends RequestSink {
AppRequestSink(ApplicationConfiguration config) : super(config) {
logger.onRecord.listen((p) => print("$p"));
var dataModel = new ManagedDataModel.fromCurrentMirrorSystem();
var psc = new PostgreSQLPersistentStore.fromConnectionInfo(
"dart", "dart", "localhost", 5432, "dart_test");
ManagedContext.defaultContext = new ManagedContext(dataModel, psc);
}
@override
void setupRouter(Router router) {
router
.route("/notes[/:id]")
.generate(() => new ManagedObjectController<Note>());
}
}
class Note extends ManagedObject<_Note> implements _Note {}
class _Note {
@managedPrimaryKey
int id;
String contents;
}
```
An ever-expanding repository of Aqueduct examples is [here](https://github.com/stablekernel/aqueduct_examples).

0 comments on commit 6c138ef

Please sign in to comment.