Skip to content

Commit

Permalink
Jaguar 2.2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
tejainece committed Aug 15, 2018
1 parent 0b85cd7 commit 614842a
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 47 deletions.
16 changes: 1 addition & 15 deletions server/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# boilerplate_mongo
# Jaguar example showcasing Authorization, PostgreSQL and Serialization

Boilerplate for using MongoDB with Jaguar.dart

Contains sample code for

1. Model
2. JSON serializer
3. Mongo serializer
4. Sample CRUD API
5. Example client

## Features and bugs

Please file feature requests and bugs at the [issue tracker][tracker].

[tracker]: http://example.com/issues/replaceme
2 changes: 1 addition & 1 deletion server/bin/prepare_db.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:jaguar_query_postgres/jaguar_query_postgres.dart';

main() async {
final PgAdapter adapter =
PgAdapter('example', username: 'postgres', password: 'dart_jaguar');
PgAdapter('jaguar_learn', username: 'postgres', password: 'dart_jaguar');
await adapter.connect();

var userBean = UserBean(adapter);
Expand Down
7 changes: 3 additions & 4 deletions server/bin/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ import 'package:jaguar_boilerplate_postgresql_server/api/api.dart';
import 'package:jaguar_dev_proxy/jaguar_dev_proxy.dart';

main() async {
// Proxy all html client requests to pub server
final proxy = PrefixedProxyServer('/', 'http://localhost:8082/');

final server = Jaguar();
server.userFetchers[User] = MyUserFetcher();
server.add(reflect(UserAccountRoutes()));
server.add(reflect(TaskRoutes()));
server.add(proxy);

// Proxy all html client requests to pub server
server.addRoute(getOnlyProxy('/*', 'http://localhost:8082/'));

server.log.onRecord.listen(print);
await server.serve(logRequests: true);
Expand Down
2 changes: 1 addition & 1 deletion server/lib/api/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export 'package:tasks_common/models.dart';
part 'tasks.dart';
part 'user.dart';

final pool = PostgresPool('example', password: 'dart_jaguar');
final pool = PostgresPool('jaguar_learn', password: 'dart_jaguar');

Future<void> pgInterceptor(Context ctx) => pool.injectInterceptor(ctx);

Expand Down
33 changes: 14 additions & 19 deletions server/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
name: jaguar_boilerplate_postgresql_server
description: Boilerplate for using postgresql with Jaguar.dart
version: 2.1.1
version: 2.2.0
authors:
- Ravi Teja Gudapati <tejainece@gmail.com>
homepage: http://jaguar-dart.github.io

environment:
sdk: '>=2.0.0-dev.55.0 <2.0.0'
sdk: '>=2.0.0 <3.0.0'

dependencies:
postgres: ^1.0.0-beta.1
jaguar: ^2.1.35
jaguar_postgres: ^2.1.1
jaguar_serializer: ^2.1.8
jaguar_query_postgres: ^2.1.1
postgres: ^1.0.0
jaguar: ^2.2.6
jaguar_postgres: ^2.2.0
jaguar_serializer: ^2.2.0
jaguar_query_postgres: ^2.2.0
ulid: ^1.0.0
jaguar_dev_proxy: ^2.1.1
jaguar_dev_proxy: ^2.2.0
tasks_common:
path: ../tasks_common
jaguar_auth: ^2.1.9
jaguar_reflect: ^2.1.1
jaguar_orm: # ^2.1.1
jaguar_auth: ^2.2.0
jaguar_reflect: ^2.2.0
jaguar_orm: ^2.2.1

dev_dependencies:
test: ^1.2.0
jaguar_serializer_cli: ^2.1.24
jaguar_orm_gen: ^2.1.14

dependency_overrides:
build_runner: ^0.9.0

# jaguar_orm: # ^2.1.1
# path: ../../../jaguar/orm/orm
jaguar_serializer_cli: ^2.2.0
jaguar_orm_gen: ^2.2.1
build_runner: ^0.10.0
12 changes: 6 additions & 6 deletions tasks_common/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: tasks_common
description: A starting point for Dart libraries or applications.
# version: 1.0.0
version: 2.2.0
# homepage: https://www.example.com
# author: Issac <email@example.com>

environment:
sdk: '>=2.0.0-dev.68.0 <3.0.0'
sdk: '>=2.0.0 <3.0.0'

dependencies:
jaguar_serializer: ^2.1.8
jaguar_serializer: ^2.2.0
jaguar_common: ^2.1.1
jaguar_resty: ^2.6.1
jaguar_resty: ^2.6.2

dev_dependencies:
jaguar_serializer_cli: ^2.1.24
test: ^1.0.0
jaguar_serializer_cli: ^2.2.0
test: ^1.3.0
build_runner: ^0.9.0
2 changes: 1 addition & 1 deletion tasks_common/tasks_common.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
Expand Down

0 comments on commit 614842a

Please sign in to comment.