From 7bf31aee4b62566bf7b04d3324c30dd0f60a3deb Mon Sep 17 00:00:00 2001 From: Tobe O Date: Sat, 20 Apr 2019 15:45:42 -0400 Subject: [PATCH] orm_service readme --- angel_orm_service/CHANGELOG.md | 2 ++ angel_orm_service/README.md | 22 ++++++++++++++++++++++ angel_orm_service/pubspec.yaml | 11 +++++++++-- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 angel_orm_service/CHANGELOG.md create mode 100644 angel_orm_service/README.md diff --git a/angel_orm_service/CHANGELOG.md b/angel_orm_service/CHANGELOG.md new file mode 100644 index 00000000..b23475f1 --- /dev/null +++ b/angel_orm_service/CHANGELOG.md @@ -0,0 +1,2 @@ +# 1.0.0 +* First version. \ No newline at end of file diff --git a/angel_orm_service/README.md b/angel_orm_service/README.md new file mode 100644 index 00000000..24045526 --- /dev/null +++ b/angel_orm_service/README.md @@ -0,0 +1,22 @@ +# angel_orm_service +[![Pub](https://img.shields.io/pub/v/angel_orm.svg)](https://pub.dartlang.org/packages/angel_orm_service) +[![build status](https://travis-ci.org/angel-dart/orm.svg)](https://travis-ci.org/angel-dart/orm) + +Service implementation that wraps over Angel ORM Query classes. + +## Usage +Brief snippet (check `example/main.dart` for setup, etc.): + +```dart +// Create an ORM-backed service. + var todoService = OrmService( + executor, () => TodoQuery(), + readData: (req, res) => todoSerializer.decode(req.bodyAsMap)); + + // Because we provided `readData`, the todoService can face the Web. + // **IMPORTANT: Providing the type arguments is an ABSOLUTE MUST, if your + // model has `int` ID's (this is the case when using `angel_orm_generator` and `Model`). + // ** + app.use>( + '/api/todos', todoService); +``` \ No newline at end of file diff --git a/angel_orm_service/pubspec.yaml b/angel_orm_service/pubspec.yaml index 89c8e810..448ad1fe 100644 --- a/angel_orm_service/pubspec.yaml +++ b/angel_orm_service/pubspec.yaml @@ -1,9 +1,15 @@ name: angel_orm_service +version: 1.0.0 +description: Service implementation that wraps over Angel ORM Query classes. +homepage: +author: Tobe O +environment: + sdk: ">=2.0.0 <3.0.0" dependencies: angel_framework: ^2.0.0-alpha angel_orm: ^2.0.0 - angel_migration: ^2.0.0-alpha dev_dependencies: + angel_migration: ^2.0.0-alpha angel_migration_runner: path: ../angel_migration_runner angel_orm_generator: @@ -15,4 +21,5 @@ dev_dependencies: build_runner: ^1.0.0 logging: ^0.11.0 pedantic: ^1.0.0 - postgres: ^1.0.0 \ No newline at end of file + postgres: ^1.0.0 + test: ^1.0.0 \ No newline at end of file