Skip to content

Commit

Permalink
Include generated Module docs w/ jsdoc
Browse files Browse the repository at this point in the history
* update readme with links to docs
* clean up server code for jsodoc rendering
* jsdoc config file
* make the install instructions make some amount of sense
* Adding inverted color  logo for dark backgrounds
* clean up some module docs -nats, server and timer
* Adding module docs in index
  • Loading branch information
esatterwhite committed Jan 2, 2017
1 parent ad9a405 commit 8c42278
Show file tree
Hide file tree
Showing 139 changed files with 143,901 additions and 692 deletions.
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ payload.txt
compose/
assets
*.tgz
jsdoc.json
docs/
57 changes: 32 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

![skyring](./assets/skyring.png)
![skyring](https://github.com/esatterwhite/skyring/raw/master/assets/skyring.png)

[![Travis](https://img.shields.io/travis/esatterwhite/skyring.svg?style=flat-square)](https://travis-ci.org/esatterwhite/skyring)
[![npm](https://img.shields.io/npm/v/skyring.svg?style=flat-square)](https://www.npmjs.com/package/skyring)
Expand All @@ -8,6 +8,9 @@
[![Code Climate](https://img.shields.io/codeclimate/github/esatterwhite/skyring.svg?style=flat-square)](https://codeclimate.com/github/esatterwhite/skyring)
[![Docker Repository on Quay](https://quay.io/repository/esatterwhite/skyring/status "Docker Repository on Quay")](https://quay.io/repository/esatterwhite/skyring)

* [Module Docs](https://esatterwhite.github.io/skyring/)
* [API Docs](https://esatterwhite.github.io/skyring/api)

# Skyring
A distributed reliable timer service providing similar functionality to using `setTimeout`.
`Skyring` servers are clustered into a *hashring* using consistent hashing to partition timers to specific nodes in the ring. Skyring exposes a simple HTTP API That allows to you create and cancel timers. Timer execution comes in to the form of an HTTP webhook ( more transports to come )
Expand All @@ -18,31 +21,11 @@ A distributed reliable timer service providing similar functionality to using `s
npm install -s skyring
```

### Skyring CLI

If you intend to run skyring as is, it may easiest to use the included binary

```
npm install -g skyring
DEBUG=skyring:* skyring run -p 3000 -s localhost:3456 -s localhost:3455
```

## Run via Docker Compose

The easiest way to run a small cluster is to use the included compose files.

- Install [Docker Compose](https://docs.docker.com/compose/install/)

```bash
$ npm start
```
## Run A Local Cluster

That is it! You have a 5 node **Skyring** cluster with a 3 node `nats` cluster behind an `nginx` proxy listening on port `8080`

## Run A Local Cluster

#### Start a nats instance
### Start a nats instance
Download the [nats binary](https://github.com/nats-io/gnatsd/releases) and start it using the defaults

```bash
Expand All @@ -57,12 +40,36 @@ $ telnet localhost 42222
PONG
```

#### Clone Skyring
### Skyring CLI

If you intend to run skyring as is, it may be preferable to use the included binary over cloning the project.

```
npm install -g skyring
DEBUG=skyring:* skyring run -p 3000 -s localhost:3456 -s localhost:3455
```


### Clone Skyring

Alternatively to the CLI, you can clone and install the project manually

```bash
$ git clone https://github.com/esatterwhite/skyring.git
$ cd skyring
$ npm install
$ DEBUG=* node index.js
```

#### Run via Docker Compose

The Easiest way to run a small cluster is to use the included [compose files](https://github.com/esatterwhite/skyring/blob/jsdocs/compose/dev.yml). It is also a good way to see how to quickly configure a cluster

- Install [Docker Compose](https://docs.docker.com/compose/install/)

```bash
$ npm start
```

The default settings expect a minimum of 2 servers on port `3455` and `3456` respectively. Start each server in a different terminal session
Expand Down Expand Up @@ -124,7 +131,7 @@ Content-Length: 0

## Cancel A Timer

#### **DELETE `/timer/:id`**
##### **DELETE `/timer/:id`**

**Request**

Expand Down
Binary file added assets/skyring-inverted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added docs/api/img/glyphicons-halflings-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/api/img/glyphicons-halflings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8c42278

Please sign in to comment.