Updated graphql
This commit is contained in:
parent
16565c26cd
commit
5c4eded653
11 changed files with 32 additions and 70 deletions
6
CHANGELOG.md
Normal file
6
CHANGELOG.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Change Log
|
||||
|
||||
## 1.0.0
|
||||
|
||||
* Changed to use `angel3` packages
|
||||
* Updated to support NNBD
|
2
LICENSE
2
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
|
||||
|
|
63
README.md
63
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.
|
||||
|
|
|
@ -2,7 +2,3 @@ include: package:pedantic/analysis_options.yaml
|
|||
analyzer:
|
||||
strong-mode:
|
||||
implicit-casts: false
|
||||
linter:
|
||||
rules:
|
||||
- unnecessary_const
|
||||
- unnecessary_new
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
/// Custom plugins go here.
|
||||
library angel.src.config.plugins;
|
||||
|
||||
import 'dart:async';
|
||||
import 'package:angel3_framework/angel3_framework.dart';
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
library angel.src.routes.controllers;
|
||||
|
||||
import 'dart:async';
|
||||
import 'package:angel3_framework/angel3_framework.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 {
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
/// Declare services here!
|
||||
library angel.services;
|
||||
|
||||
import 'dart:async';
|
||||
import 'package:angel3_framework/angel3_framework.dart';
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue