Protevus is a highly versatile and extensible application server platform for the Dart programming language. Inspired by the Laravel framework, Protevus aims to provide a familiar and Laravel-compatible API, allowing developers to leverage their existing Laravel knowledge and experience in the Dart ecosystem. https://protevus.com
Find a file
2017-04-03 07:17:34 -04:00
.idea Custom plug-ins :) 2016-12-10 13:51:02 -05:00
.vscode Better password security 2017-03-04 16:40:01 -05:00
bin Update multi_server.dart 2017-03-23 08:50:03 -04:00
config Update default.yaml 2017-01-28 11:23:35 -05:00
lib Update user.dart 2017-03-12 18:31:56 -04:00
test/services Update users_test.dart 2016-12-25 12:23:48 -05:00
tool Delete watch.dart 2017-02-28 18:00:10 -05:00
views Favicon 2016-12-27 09:30:22 -05:00
web Bye DS store 2017-02-12 19:08:06 -05:00
.analysis-options Update .analysis-options 2017-03-12 18:57:24 -04:00
.dockerignore Docker! 2017-01-14 19:15:20 -05:00
.gitignore Update .gitignore 2017-03-05 22:03:59 -05:00
Dockerfile 121 2017-01-14 19:56:30 -05:00
LICENSE :) 2016-04-21 22:56:21 -04:00
pubspec.yaml Update pubspec.yaml 2017-02-28 17:59:39 -05:00
README.md Update README.md 2017-04-03 07:17:34 -04:00

The Angel Framework

Gitter version: v1.0.0-beta

Wiki (in-depth documentation)

API Documentation

Roadmap

File an Issue

The Dart server framework that's ready for showtime.

Angel is a full-featured server-side Web application framework for the Dart programming language. It strives to be a flexible, extensible system, to be easily scalable, and to allow as much code to be shared between clients and servers as possible. Ultimately, I believe that this approach will shorten the time it takes to build a full-stack Web application, from start to finish. Read more...

Like what you see? Please lend us a star.

Installation & Setup

Having errors with a fresh Angel installation? See here for help.

Once you have Dart installed, bootstrapping a project is as simple as running one shell command:

Install the Angel CLI:

pub global activate angel_cli

Bootstrap a project:

angel init hello

You can even have your server run and be live-reloaded on file changes:

angel start

Next, check out the detailed documentation to learn to flesh out your project.

Features

With features like the following, Angel is the all-in-one framework you should choose to build your next project:

Basic Example

More examples and complete projects can be found in the angel-example organization.

The following is an explosive application complete with a REST API and WebSocket support. It interacts with a MongoDB database, and reads configuration automatically from a config/<ANGEL-ENV-NAME>.yaml file. Templates are rendered with Mustache, and all responses are compressed via GZIP.

All in just about 20 lines of actual code.

import 'dart:async';
import 'package:angel_common/angel_common.dart';
import 'package:angel_websocket/server.dart';
import 'package:mongo_dart/mongo_dart.dart';

main() async {
  var app = await createServer();
  var server = await app.startServer(InternetAddress.LOOPBACK_IP_V4, 8080);
  print('Angel listening at http://${server.address.address}:${server.port}');
}

Future<Angel> createServer() async {
  // New instance...
  var app = new Angel();
  
  // Configuration
  await app.configure(loadConfigurationFile());
  await app.configure(mustache());
  Db db = new Db();
  await db.open(app.mongodb_url);
  app.container.singleton(db); // Add to DI

  // Routes
  app.get('/foo', (req, res) => res.render('hello'));
  
  app.post('/query', (Db db) async {
    // Db is an injected dependency here :)
    return await db.collection('foo').find().toList();
  });
  
  // Services (which build REST API's and are broadcasted over WS)
  app.use('/bombs', new MongoService(db.collection('bombs')));
  app.use('/users', new MongoService(db.collection('users')));
  app.use('/explosions', new AnonymousService(create: (data, [params]) => data));
  
  
  // Setup WebSockets, add GZIP, etc.
  await app.configure(new AngelWebSocket(debug: true));
  app.responseFinalizers.add(gzip());
  
  return app;
}

Join the team

Do you want to collaborate? Join the project at https://projectgroupie.com/projects/212