by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 07 20:21
    devisions commented #256
  • Aug 07 20:21
    devisions commented #256
  • Aug 06 21:31
    kevinelliott commented #256
  • Aug 06 21:31
    kevinelliott commented #256
  • Aug 06 15:32
    sayatert opened #275
  • Aug 06 15:32
    sayatert opened #275
  • Jul 23 10:38
    note8g2018 opened #274
  • Jul 23 10:38
    note8g2018 opened #274
  • Jul 18 15:58
    Paradoxu edited #273
  • Jul 18 15:58
    Paradoxu edited #273
  • Jul 18 08:55
    Paradoxu edited #273
  • Jul 18 08:55
    Paradoxu edited #273
  • Jul 18 08:55
    Paradoxu edited #273
  • Jul 18 08:55
    Paradoxu edited #273
  • Jul 18 08:54
    Paradoxu opened #273
  • Jul 18 08:54
    Paradoxu opened #273
  • Jul 14 15:25
    thosakwe commented #71
  • Jul 14 15:25
    thosakwe commented #71
  • Jul 14 14:49
    ssummer commented #71
  • Jul 14 14:49
    ssummer commented #71
Tobe Osakwe
@thosakwe
Shipped package:angel_configuration@2.2.0 - main change is that you can now _include the contents of one config file into another: https://pub.dev/packages/angel_configuration/versions/2.2.0
Tobe Osakwe
@thosakwe
Plan for the rest of the week is to resolve all outstanding package:angel_validate errors, write unit tests, and then ship 3.0.0
And then onto the next package... And so forth until all the issues are closed
Jermaine Oppong
@graphicbeacon
Thanks for the update @thosakwe
What's your preferred way of accepting contributions?
James
@u007
does angel graphql server uses mirror?
ok found the doc, not needed
Omar BELKHODJA
@omarbelkhodja
I'm trying to use angel_auth. I have setup the url for the local authentication, which returns successfully the JWT token. Now I want to specify that some of my "post" URLs require an authenticated user. I can't find any example, how to perform this setup. @thosakwe is it possible to provide an example of that ? Simply injecting the user app.get('/greetings', ioc((User user) { is returning a 403 error.
Omar BELKHODJA
@omarbelkhodja
Found it app.chain([requireAuthentication<User>()]).get('/greetings', ioc((User user, RequestContext<dynamic> req) {
Mirkan Çalışkan
@mirkancal
image.png
Closing parentheses is missing from the snippet on Getting Started
blambe
@blambe

@thosakwe Hey Tobe, or anyone else who may be knowledgeable, I'm getting a "Paused on Exception" with the error: "StateError(Bad state: cannot modify a closed response)" any time I try to return res.json to an external program. res.write works without issue at any of the paths.

'''
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel_cors/angel_cors.dart';
import 'heroes_db.dart';

main() async {
var app = Angel();
var http = AngelHttp(app);

app.fallback(cors());

app.get('/', (req, res) => res.write('Hello, world!'));
app.get('/try', (req, res) => res.write('It works'));
app.get('/this', (req, res) => res.write('Yaaaa'));
app.get('/getAll', (req, res) => res.json(Hero(id: 1, name: "Guy")));

await http.startServer('localhost', 3000);

print("Listening on ${http.server.address.address}:${http.server.port}");
}
'''

import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel_cors/angel_cors.dart';
import 'heroes_db.dart';

main() async {
  var app = Angel();
  var http = AngelHttp(app);

  app.fallback(cors());

  app.get('/', (req, res) => res.write('Hello, world!'));
  app.get('/try', (req, res) => res.write('It works'));
  app.get('/this', (req, res) => res.write('Yaaaa'));
  app.get('/getAll', (req, res) => res.json(Hero(id: 1, name: "Guy")));


  await http.startServer('localhost', 3000);

  print("Listening on ${http.server.address.address}:${http.server.port}");
}
Tobe Osakwe
@thosakwe
What command are you using to run the server? You'll want to disable pausing on exceptions. Prefer using --enable-vm-service=<port> instead of --observe
blambe
@blambe
was just using webdev serve
Tobe Osakwe
@thosakwe
To run Angel?
blambe
@blambe
err, was running by starting debug in vscode
Tobe Osakwe
@thosakwe
Hmm, not 100% how to set flags in VScode off the top of my head
blambe
@blambe
Ok got it, but it should run smoothly if I disable pausing? Also, is there some other way I should be doing it to not get exceptions?
Tobe Osakwe
@thosakwe
Hmm
Try just returning the Hero object instead of calling res.json
blambe
@blambe
Ah hah, works like a charm... I'm guessing angel must know to automatically convert objects to json when being sent out as a response? If so, whats the guidance on when to use res.json?
Tobe Osakwe
@thosakwe
Yep, any non-null/non-bool value to return is serialized using app.serializer
app.serializer defaults to json.encode from dart:convert
There is zero reason to use res.json at this point
It's just a wrapper over res.serialize
Which is also almost never called
Only in packages that add additional functionality
blambe
@blambe
Gotcha. Thanks man, and kudos I'm incredibly impressed with how much you've done!
luX0r-reload
@luX0r-reload
Hi and Thanks for Angel! My question is:"There is any way handle refresh Token with auth plugin?".
A JWT has an expiration date... so what if the token expires while the client is doing (important) operations?
mkndmail
@mkndmail
Hi ,
I am thinking to build a backend for my app. I know flutter and Liked the Dart programming language. Later I searched for the server dart framework and came across Angel. So my questions is should I go with it, is it stable? What about future, would the continue supporting it or would they stop the support?
James
@u007
hi @thosakwe is it possible to use Angel Production runner to handle dart grpc server? :)
James
@u007
my angel framework stop serving any website
nothing works, not even get / hellow worl
James
@u007
oh nvm, my mistake
grey faulkenberry
@Dokotela
I'm trying to create a flutter webapp that can then be hosted on an angel server. Has anyone here already done this? If so, what html renderer did you use? I know at some point it was jael, but I couldn't tell if that was still the recommendation. Tobe thanks again for such an amazing product!
James
@u007
not commit for over 9months
all pull request was pending
over 1year
anyway we could take over it
i mean mongodb dart
Bordunos
@bordunosp
hello
is there a package json-rpc vs websocket ?
Madreyv
@Madreyv
Does anyone can help me with Angel issue?
Bordunos
@bordunosp

hi guys
trying connect websocket, but have the error:
"(index):23 WebSocket connection to 'ws://127.0.0.1:3000/ws' failed: Error during WebSocket handshake: Unexpected response code: 404"

what am I doing wrong?
thank alot for helping...

controllers.dart

library server.src.routes.controllers;

import 'dart:async';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_websocket/server.dart';
import 'package:server/src/routes/controllers/WsController.dart';

Future configureServer(Angel app) async {
  var ws = AngelWebSocket(app, sendErrors: !app.environment.isProduction);

  await app.configure(ws.configureServer);
  await app.configure(WsController(ws).configureServer);
}

WsController.dart

import 'package:angel_framework/angel_framework.dart';
import 'package:angel_websocket/server.dart';

@Expose('/ws')
class WsController extends WebSocketController {
  WsController(AngelWebSocket ws): super(ws);

  @override
  void onConnect(WebSocketContext socket) {
    print('onConnect');
  }
}
mradhoussem
@mradhoussem
Hey tobe , i am trying to create sql request SUM or COUNT , i tried with executor .query(select count(*) from table ) , is there any solution ??
image.png
note8g2018
@note8g2018
Dear Sir, How to return all document inside collection of MongoDB as Stream with your framework?
I try this code but give me error:
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:mongo_dart/mongo_dart.dart' as mongo;

main() async
{
  var app = Angel();
  var http = AngelHttp(app);
  app.get('/', (req, res) => res.write('Hello, world!'));
  app.get('/articleall', (req, res) async {
    const String url =
        'mongodb://note8g2018:123456789@localhost:27017/flutter?authSource=admin';
    mongo.Db db;
    db = mongo.Db(url);
    await db.open();
    final mongo.DbCollection collectionArticle = db.collection('articles');
    var myStream = collectionArticle.find({"author": "zaq12wsx2"});

    return res.write(myStream);
  });
  await http.startServer('192.168.1.100', 3000);
}
note8g2018
@note8g2018
anyone alive here
sayatert
@sayatert

Hello,

We want to integrate sqlite using angel orm. Can you help with this ? We couldn't integrate sqlite using angel orm on mobile part. If there is a SQLite sample project, this may be enough for us.