From d9391c05feffa45a93898098b1a812877c8af5a5 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Tue, 21 Aug 2018 15:08:32 -0400 Subject: [PATCH] Update README --- README.md | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/README.md b/README.md index 16abcb27..d704c241 100644 --- a/README.md +++ b/README.md @@ -43,34 +43,7 @@ applying YAML configuration. **Server-side** Call `configuration()`. The loaded configuration will be available in your application's -`configuration` map, which means you can access them like normal instance members. - -```dart -main() { - print(app.foo == app.configuration['foo']); // true -} -``` - -An instance of `Configuration` will also be injected to your application, and it works -the same way: - -```dart -import 'dart:io'; -import 'package:angel_framework/angel_framework.dart'; -import 'package:angel_configuration/angel_configuration.dart'; -import 'package:file/local.dart'; - -main() async { - var app = new Angel(); - var fileSystem = const LocalFileSystem(); - - await app.configure(configuration(fileSystem)); // It's that easy! - - app.get('/foo', (Configuration config) { - return config.some_key; - }); -} -``` +`configuration` map. `configuration` also accepts a `sourceDirectory` or `overrideEnvironmentName` parameter. The former will allow you to search in a directory other than `config`, and the latter lets you