Skip to content

Commit

Permalink
Enable to install by go get
Browse files Browse the repository at this point in the history
  • Loading branch information
mizzy committed Apr 16, 2018
1 parent 52bfdd5 commit 2e8f745
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ fmt: setup
goimports -w .

build:
vgo build -o bin/$(NAME) cmd/nolmandy/nolmandy.go
vgo build -o bin/$(NAME)-server cmd/nolmandy/nolmandy_server.go
vgo build -o bin/$(NAME) cmd/nolmandy/main.go
vgo build -o bin/$(NAME)-server cmd/nolmandy-server/main.go

clean:
rm bin/$(NAME)
Expand Down
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,39 @@ Also you can use nolmandy as a receipt processing library.

## Usage

### Compile nolmandy
### As a receipt validation command line tool

Run make command.
Install `nolmandy` command.

```
make
go get github.com/aktsk/nolmandy/cmd/nolmandy
```

### As a receipt validation command line tool

Run nolmandy command to validate a receipt by Apple Root certificate.

```
cat receipt | bin/nolmandy
cat receipt | nolmandy
```

You can validate a certificate by your own certificate.

```
cat receipt | bin/nolmandy -certFile cert.pem
cat receipt | nolmandy -certFile cert.pem
```


### As a validation server

Install `nolmandy-server` command.

```
go get github.com/aktsk/nolmandy/cmd/nolmandy-server
```

Run nolmandy server.

```
bin/nolmandy-server -port 8000
nolmandy-server -port 8000
```

Post base64 encoded receipt data to nolmandy server.
Expand All @@ -51,7 +55,7 @@ curl -s -H 'Content-Type:application/json' -d '{ "receipt-data": "MIIeWQYJK..."
You can use your own certificate instead of Apple certificate.

```
bin/nolmandy-server -certFile cert.pem
nolmandy-server -certFile cert.pem
```

### As a validation library
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build ignore

package main

import (
Expand Down
2 changes: 0 additions & 2 deletions cmd/nolmandy/nolmandy.go → cmd/nolmandy/main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build ignore

package main

import (
Expand Down

0 comments on commit 2e8f745

Please sign in to comment.