Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
conortm committed Jan 25, 2016
1 parent c0ea869 commit 77f5102
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions README.md
Expand Up @@ -2,25 +2,45 @@

A simple service for creating & getting UUIDs, provided a key.

## Running locally
This is a [Go](http://golang.org/) web service, backed by [MongoDB](https://www.mongodb.org/),
running on [Docker](https://www.docker.com/), with [Vagrant](https://www.vagrantup.com/)
for those who need it.

Get a local instance up and running with [Vagrant](https://www.vagrantup.com/):
## How to use this image

Start a [uuid-service](https://hub.docker.com/r/conortm/uuid-service/) instance
and link it to a [MongoDB](https://hub.docker.com/_/mongo/) instance:

```bash
vagrant up
docker run --name some-uuid-service --link some-mongo:mongo -d conortm/uuid-service
```

## How to use this service

Once you have the service running at `[uuid-service-url]` (i.e. `http://www.example.com:8080`),
do the following:

To create a new `UUID`, run:

```bash
curl -v -X PUT http://localhost:3000/uuid/my-key
curl -v -X PUT [uuid-service-url]/uuid/my-key
```

**Note:** A status of `201 Created` indicates a successfully created UUID. A status of `200 OK`
indicates that the UUID already exists for the provided key.
**Note:** A response status of `201 Created` indicates a successfully created UUID.
A status of `200 OK` indicates that the UUID already exists for the provided key.

To get an existing `UUID`, run:

```bash
curl -v http://localhost:3000/uuid/my-key
curl -v [uuid-service-url]/uuid/my-key
```

## Vagrant

Get a local instance up and running with:

```bash
vagrant up
```

**Note:** Your `[uuid-service-url]` above is `http://localhost:3000`.

0 comments on commit 77f5102

Please sign in to comment.