Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
prongbang committed May 2, 2020
2 parents 56449c1 + 175d9fe commit c4785ac
Showing 1 changed file with 54 additions and 52 deletions.
106 changes: 54 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,64 @@

> [Wiremock](https://hub.docker.com/r/prongbang/wiremock) Minimal Mock your APIs
## Matching Routes using gorilla/mux
## How to run

### Run with Docker

```yaml
version: '3.7'
services:
app_wiremock:
image: prongbang/wiremock:latest
ports:
- "8000:8000"
volumes:
- "./mock:/mock"
```

```
$ docker-compose up -d
```

### Run with Golang

```shell script
$ go get -u github.com/prongbang/wiremock
$ cd project
```
Read doc https://github.com/gorilla/mux#matching-routes

#### Default port `8000`

```bash
$ wiremock
```

#### Custom port `9000`

```bash
$ wiremock -port=9000
```

- Running

```shell script
_ ___ __
| | /| / (_)______ __ _ ___ ____/ /__
| |/ |/ / / __/ -_) ' \/ _ \/ __/ '_/
|__/|__/_/_/ \__/_/_/_/\___/\__/_/\_\


-> wiremock server started on :8000
```

### Example Project

[https://github.com/prongbang/wiremock-example](https://github.com/prongbang/wiremock-example)

## Matching Routes using gorilla/mux

Read doc [https://github.com/gorilla/mux#matching-routes](https://github.com/gorilla/mux#matching-routes)

## Setup project

```shell script
Expand Down Expand Up @@ -70,53 +122,3 @@ routes:
body: >
{"message": "success"}
```

## How to run

### Docker

```yaml
version: '3.7'
services:
app_wiremock:
image: prongbang/wiremock
ports:
- "8000:8000"
volumes:
- "./mock:/mock"
```

### Golang

```shell script
$ go get -u github.com/prongbang/wiremock
$ cd project
```

- Default port `8000`

```bash
$ wiremock
```

- Custom port `9000`

```bash
$ wiremock -port=9000
```

- Running

```shell script
_ ___ __
| | /| / (_)______ __ _ ___ ____/ /__
| |/ |/ / / __/ -_) ' \/ _ \/ __/ '_/
|__/|__/_/_/ \__/_/_/_/\___/\__/_/\_\


-> wiremock server started on :8000
```

### Example Project

[https://github.com/prongbang/wiremock-example](https://github.com/prongbang/wiremock-example)

0 comments on commit c4785ac

Please sign in to comment.