From 5c4eded65395c9894fa437c1dfd4e7ad4193b42d Mon Sep 17 00:00:00 2001 From: thomashii Date: Sat, 17 Jul 2021 13:05:34 +0800 Subject: [PATCH] Updated graphql --- CHANGELOG.md | 6 ++ LICENSE | 2 +- README.md | 63 +++++++-------------- analysis_options.yaml | 4 -- lib/angel.dart | 2 - lib/src/config/config.dart | 3 - lib/src/config/plugins/plugins.dart | 3 - lib/src/routes/controllers/controllers.dart | 2 - lib/src/routes/routes.dart | 11 ++-- lib/src/services/services.dart | 3 - pubspec.yaml | 3 +- 11 files changed, 32 insertions(+), 70 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a750059 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +# Change Log + +## 1.0.0 + +* Changed to use `angel3` packages +* Updated to support NNBD diff --git a/LICENSE b/LICENSE index 52a1469..ee2937d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 angel-dart +Copyright (c) 2021 dukefirehawk.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 151d490..83c8089 100644 --- a/README.md +++ b/README.md @@ -1,60 +1,37 @@ -[![The Angel Framework](https://angel-dart.github.io/assets/images/logo.png)](https://angel-dart.dev) +# Graphql Starter Application for Angel3 framework -[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/angel_dart/discussion) -[![Pub](https://img.shields.io/pub/v/angel_framework.svg)](https://pub.dartlang.org/packages/angel_framework) -[![Build status](https://travis-ci.org/angel-dart/framework.svg?branch=master)](https://travis-ci.org/angel-dart/framework) -![License](https://img.shields.io/github/license/angel-dart/framework.svg) - -**A polished, production-ready backend framework in Dart.** - -*Note: This repo is an application boilerplate ,and not the underlying framework library.* - ------ -## About -Angel is a full-stack Web framework in Dart. It aims to -streamline development by providing many common features -out-of-the-box in a consistent manner. - -With features like the following, Angel is the all-in-one framework you should choose to build your next project: -* [GraphQL Support](https://github.com/angel-dart/graphql) -* [PostgreSQL ORM](https://github.com/angel-dart/orm) -* [Dependency Injection](https://docs.angel-dart.dev/guides/dependency-injection) -* And [much more](https://github.com/angel-dart)... +This is a graphql starter application for [Angel3 framework](https://pub.dartlang.org/packages/angel3_framework) which is a full-stack Web framework in Dart. ## Installation & Setup -Once you have [Dart](https://www.dartlang.org/) installed, bootstrapping a project is as simple as running a few shell commands: +1. Download and install [Dart](https://dart.dev/get-dart). -Install the [Angel CLI](https://github.com/angel-dart/cli): +### Development -```bash -pub global activate angel_cli -``` +1. Run the following command to start Angel3 server in dev mode to *hot-reloaded* on file changes: -Bootstrap a project: + ```bash + dart --observe bin/dev.dart + ``` -```bash -angel init hello -``` +2. Modify the code and watch the changes applied to the application -You can even have your server run and be *hot-reloaded* on file changes: +### Production -```bash -dart --observe bin/dev.dart -``` +1. Run the following command: -Next, check out the [detailed documentation](https://docs.angel-dart.dev/v/2.x) to learn to flesh out your project. + ```bash + dart bin/prod.dart + ``` -## Examples and Documentation -Visit the [documentation](https://docs.angel-dart.dev/v/2.x) -for dozens of guides and resources, including video tutorials, -to get up and running as quickly as possible with Angel. +2. Run as docker. Edit and run the provided `Dockerfile` to build the image. -Examples and complete projects can be found -[here](https://github.com/angel-dart/examples-v2). +## Resources +Visit the [Developer Guide](https://angel3-docs.dukefirehawk.com/guides) for dozens of guides and resources, including video tutorials, to get up and running as quickly as possible with Angel3. -You can also view the [API Documentation](http://www.dartdocs.org/documentation/angel_framework/latest). +Examples and complete projects can be found [here](https://github.com/dukefirehawk/angel3-examples). -There is also an [Awesome Angel :fire:](https://github.com/angel-dart/awesome-angel) list. +You can also view the [API Documentation](https://pub.dev/documentation/angel3_framework/latest/). +There is also an [Awesome Angel :fire:](https://github.com/dukefirehawk/angel3-awesome) list. diff --git a/analysis_options.yaml b/analysis_options.yaml index 2981164..a4f3335 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -2,7 +2,3 @@ include: package:pedantic/analysis_options.yaml analyzer: strong-mode: implicit-casts: false -linter: - rules: - - unnecessary_const - - unnecessary_new diff --git a/lib/angel.dart b/lib/angel.dart index 59d8bde..baaf97c 100644 --- a/lib/angel.dart +++ b/lib/angel.dart @@ -1,6 +1,4 @@ /// Your very own web application! -library angel; - import 'dart:async'; import 'package:angel3_framework/angel3_framework.dart'; import 'package:file/local.dart'; diff --git a/lib/src/config/config.dart b/lib/src/config/config.dart index 6aeb9e8..9dc78fc 100644 --- a/lib/src/config/config.dart +++ b/lib/src/config/config.dart @@ -1,6 +1,3 @@ -/// Configuration for this Angel instance. -library angel.src.config; - import 'package:angel3_configuration/angel3_configuration.dart'; import 'package:angel3_framework/angel3_framework.dart'; import 'package:angel3_jael/angel3_jael.dart'; diff --git a/lib/src/config/plugins/plugins.dart b/lib/src/config/plugins/plugins.dart index d45466c..9fc84b5 100644 --- a/lib/src/config/plugins/plugins.dart +++ b/lib/src/config/plugins/plugins.dart @@ -1,6 +1,3 @@ -/// Custom plugins go here. -library angel.src.config.plugins; - import 'dart:async'; import 'package:angel3_framework/angel3_framework.dart'; diff --git a/lib/src/routes/controllers/controllers.dart b/lib/src/routes/controllers/controllers.dart index e55e239..1942aaf 100644 --- a/lib/src/routes/controllers/controllers.dart +++ b/lib/src/routes/controllers/controllers.dart @@ -1,5 +1,3 @@ -library angel.src.routes.controllers; - import 'dart:async'; import 'package:angel3_framework/angel3_framework.dart'; diff --git a/lib/src/routes/routes.dart b/lib/src/routes/routes.dart index 9fd7abc..ae5d2e6 100644 --- a/lib/src/routes/routes.dart +++ b/lib/src/routes/routes.dart @@ -1,6 +1,3 @@ -/// This app's route configuration. -library angel.src.routes; - import 'package:angel3_framework/angel3_framework.dart'; import 'package:angel3_static/angel3_static.dart'; import 'package:file/file.dart'; @@ -10,8 +7,8 @@ import 'graphql/graphql.dart' as graphql; /// Put your app routes here! /// /// See the wiki for information about routing, requests, and responses: -/// * https://github.com/angel-dart/angel/wiki/Basic-Routing -/// * https://github.com/angel-dart/angel/wiki/Requests-&-Responses +/// * https://angel3-docs.dukefirehawk.com/guides/basic-routing +/// * https://angel3-docs.dukefirehawk.com/guides/requests-and-responses AngelConfigurer configureServer(FileSystem fileSystem) { return (Angel app) async { // Typically, you want to mount controllers first, after any global middleware. @@ -31,7 +28,7 @@ AngelConfigurer configureServer(FileSystem fileSystem) { // // Read the following two sources for documentation: // * https://medium.com/the-angel-framework/serving-static-files-with-the-angel-framework-2ddc7a2b84ae - // * https://github.com/angel-dart/static + // * https://pub.dev/packages/angel3_static if (!app.environment.isProduction) { var vDir = VirtualDirectory( app, @@ -47,7 +44,7 @@ AngelConfigurer configureServer(FileSystem fileSystem) { // Set our application up to handle different errors. // // Read the following for documentation: - // * https://github.com/angel-dart/angel/wiki/Error-Handling + // * https://angel3-docs.dukefirehawk.com/guides/error-handling var oldErrorHandler = app.errorHandler; app.errorHandler = (e, req, res) async { diff --git a/lib/src/services/services.dart b/lib/src/services/services.dart index 1d68f07..bf1ce7c 100644 --- a/lib/src/services/services.dart +++ b/lib/src/services/services.dart @@ -1,6 +1,3 @@ -/// Declare services here! -library angel.services; - import 'dart:async'; import 'package:angel3_framework/angel3_framework.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index fc46336..f83cdd6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,9 +1,8 @@ name: angel -description: An app that's going to be amazing pretty soon. +description: A graphql starter application for Angel3 framework publish_to: none environment: sdk: '>=2.12.0 <3.0.0' -homepage: https://github.com/dukefirehawk/boilerplates dependencies: angel3_auth: ^4.0.0 angel3_configuration: ^4.0.0