Update README.md
This commit is contained in:
parent
beb83fa386
commit
96545265e8
1 changed files with 3 additions and 2 deletions
|
@ -51,10 +51,10 @@ With features like the following, Angel is the all-in-one framework you should c
|
|||
More examples and complete projects can be found in the [angel-example](https://github.com/angel-example) organization.
|
||||
|
||||
The following is an [explosive application](https://github.com/angel-example/explode) 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.
|
||||
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.
|
||||
|
||||
```dart
|
||||
import 'dart:async;'
|
||||
import 'dart:async';
|
||||
import 'package:angel_common/angel_common.dart';
|
||||
import 'package:angel_websocket/server.dart';
|
||||
import 'package:mongo_dart/mongo_dart.dart';
|
||||
|
@ -68,6 +68,7 @@ main() async {
|
|||
Future<Angel> createServer() async {
|
||||
// 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
|
||||
|
|
Loading…
Reference in a new issue