1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00

More docs

This commit is contained in:
ivaosthu 2016-11-30 21:46:40 +01:00
parent b1e11794f8
commit a4d2da872a
4 changed files with 44 additions and 8 deletions

View File

@ -143,7 +143,7 @@ Returns 200-respose if the feature toggle was updated successfully.
Used to archive a feature toggle. A feature toggle can never be totally be deleted,
but can be archived. This is a design decision to make sure that a old feature
toggle suddnely reapear by some one else reusing the same name.
toggle suddenly reappears becuase someone else re-using the same name.
## Archive

View File

@ -1,6 +1,8 @@
# API Documentation
Contents:
Version: 1.0
**Contents:**
* [Feature Toggles API](feature-toggles-api.md)
* [Strategies API](strategies-api.md)

View File

@ -1,6 +1,7 @@
# Schema
This document describes our current database schama used in PostgreSQL
This document describes our current database schama used in PostgreSQL.
We use db-migrate to migrate (create tables, add columns etc) the database.
## Table: _migrations_
@ -12,8 +13,6 @@ Used by db-migrate module to keep track of migrations.
| name | varchar | 255 | 0 | (null) |
| run_on | timestamp | 29 | 0 | (null) |
## Table: _events_
| NAME | TYPE | SIZE | NULLABLE | COLUMN_DEF |
| ----------- | --------- | ----------- | -------- | ---------------------------------- |
@ -43,3 +42,31 @@ Used by db-migrate module to keep track of migrations.
| description | text | 2147483647 | 1 | (null) | |
| archived | int4 | 10 | 1 | 0 | |
| strategies | json | 2147483647 | 1 | (null) | |
## Table: _client_strategies_
| COLUMN_NAME | TYPE_NAME | COLUMN_SIZE | NULLABLE | COLUMN_DEF |
| ----------- | --------- | ----------- | -------- | ---------- |
| app_name | varchar | 255 | 0 | (null) |
| updated_at | timestamp | 29 | 1 | now() |
| strategies | json | 2147483647 | 1 | (null) |
## Table: _client_instances_
| COLUMN_NAME | TYPE_NAME | COLUMN_SIZE | NULLABLE | COLUMN_DEF |
| ----------- | --------- | ----------- | -------- | ---------- |
| app_name | varchar | 255 | 1 | (null) |
| instance_id | varchar | 255 | 1 | (null) |
| client_ip | varchar | 255 | 1 | (null) |
| last_seen | timestamp | 29 | 1 | now() |
| created_at | timestamp | 29 | 1 | now() |
## Table: _client_metrics_
| COLUMN_NAME | TYPE_NAME | COLUMN_SIZE | NULLABLE | COLUMN_DEF |
| ----------- | --------- | ----------- | -------- | ------------------------------------------ |
| id | serial | 10 | 0 | nextval('client_metrics_id_seq'::regclass) |
| created_at | timestamp | 29 | 1 | now() |
| metrics | json | 2147483647 | 1 | (null) |

View File

@ -1,6 +1,13 @@
(unleash-server is currently not released yet with these capabilites, but when it is this is how to use unleash)
# Getting stated (v.1.0.x)
### The simplest way to get started:
### Prerequisite
To run unleash you need to provide a PostgreSQL databse (PostgreSQL v.9.5.x or newer).
You need to give unleash a database uri which includes a username and password, that have rights to
migrate the database. _Unleash_ will, at startup, check whether database migration is needed,
and perform necessary migrations.
### 1. The simplest way to get started:
```bash
$ npm install unleash-server -g
@ -9,7 +16,7 @@ $ unleash -d postgres://unleash_user:passord@localhost:5432/unleash -p 4242
Unleash started on port:4242
```
### Or programmatically:
### 2. Or programmatically:
```js
const unleash = require('unleash-server');