atlassian_connect_config 0.4.2 copy "atlassian_connect_config: ^0.4.2" to clipboard
atlassian_connect_config: ^0.4.2 copied to clipboard

Dart 1 only

Atlassian Connect helpers for managing configuration between enviromnents

Configuration for Atlassian Connect Dart #

Introduction #

The configuration library for AcDart provides support for managing configuration for different environments. In particular it has direct support for production and development enviroments with as much defaulting as possible (in development mode) to make set up as easy as possible.

Instead of relying on text files (such as property files, YAML, JSON etc) the library instead uses Dart based configuration. Thanks to Dart's concise syntax and the fact that it is not a compiled language there is not much downside to this approach.

In the upside, using Dart allows for code completion, tool support for catching typos, refactoring etc.

This library can be used on it's own (e.g. as part of your own custom Dart based Atlassian Connect client framework) or as part of the Atlassian Connect Shelf based server.

Using #

Basic Usage #

The following shows an example of setting up configuration for development and production.

final config = new AcDartConfigFactory.standard(
    new AcDartConfig(
        addonKey: 'foo-bar-addon',
        repoConfig: new AcDartHostRepoConfig.mongo()
    ), 
    development: () => new AcDartConfig.development(),
    production: () => new AcDartConfig());

This configuration relies on the default values and will run in development.

From there you can start to tweak settings as you like. For example

    development: () => new AcDartConfig.development(
        installAddonOnStartup: false,
        repoConfig: new AcDartHostRepoConfig.mongo(dbUrl: AcDartHostRepoConfig.defaultTestMongoUrlStr)
    ),

will turn off the auto installation of the addon and use mongo on the default test url for development (instead of in memory which is the default).

1
likes
10
pub points
0%
popularity

Publisher

unverified uploader

Atlassian Connect helpers for managing configuration between enviromnents

Homepage

License

unknown (LICENSE)

Dependencies

atlassian_connect_host, logging

More

Packages that depend on atlassian_connect_config