# letatlin

> A library for configuring your application through etcd

Latest version **1.0.1** (published 2015-01-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install letatlin
pnpm add letatlin
yarn add letatlin
bun add letatlin
```

Provides the command `letatlin`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-01-14 |
| First published | 2014-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Hugo Wetterberg |
| Maintainers | hugowetterberg |
| Keywords | config, etcd |

## Links

- npm: https://www.npmjs.com/package/letatlin
- Repository: https://github.com/bloglovin/letatlin
- Issues: https://github.com/bloglovin/letatlin/issues
- npm.io page: https://npm.io/package/letatlin

## Dependencies (5)

- [async](https://npm.io/package/async.md) ^0.2.10
- [bletcd](https://npm.io/package/bletcd.md) ^2.2.0
- [docopt](https://npm.io/package/docopt.md) ~0.4.0
- [lodash](https://npm.io/package/lodash.md) ~2.4.1
- [semver](https://npm.io/package/semver.md) ^2.2.1

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-01-14
- 1.0.0 — 2014-11-05
- 0.1.6 — 2014-07-30
- 0.1.4 — 2014-06-27
- 0.1.3 — 2014-06-27
- 0.1.2 — 2014-04-23
- 0.1.1 — 2014-03-31

## README

# Letatlin

Letatlin loads your applications environment-dependent configuration from etcd. Planned support for reloading applications to reconfiguration.

## Usage

Populate etcd with some values:

```bash
curl -L http://127.0.0.1:4001/v2/keys/greetings/default -XPUT -d value="Welcome to Letatlin"
curl -L http://127.0.0.1:4001/v2/keys/mysql/documents -XPUT -d value="mysql://user:pass@host/database"
curl -L http://127.0.0.1:4001/v2/keys/config/applicationX/foo -XPUT -d value="Foo value"
curl -L http://127.0.0.1:4001/v2/keys/config/applicationX/bar -XPUT -d value="Bar value"
```

Run this (examples/basic.js):

```javascript
var lib = {
  letatlin: require('../')
};

var environment = {
  greeting: {
    key: "/greetings/default"
  },
  mysql: {
    key: "/mysql/documents",
    format: "url"
  },
  config: {
    key:"/config/applicationX",
    recursive: true
  }
};

lib.letatlin(environment, function runApp(error, env) {
  console.log(env.greeting);
  console.log(JSON.stringify(env, null, '  '));
});

```

And it should output:

```
Welcome to Letatlin
{
  "greeting": "Welcome to Letatlin",
  "mysql": {
    "protocol": "mysql:",
    "slashes": true,
    "auth": "user:pass",
    "host": "host",
    "port": null,
    "hostname": "host",
    "hash": null,
    "search": null,
    "query": null,
    "pathname": "/database",
    "path": "/database",
    "href": "mysql://user:pass@host/database",
    "user": "user",
    "password": "pass"
  },
  "config": {
    "foo": "Foo value",
    "bar": "Bar value"
  }
}
```

---
_Source: https://npm.io/package/letatlin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
