Skip to content

Commit

Permalink
Changing version before release 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaupu committed Oct 11, 2017
1 parent 674fac4 commit 53e7157
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 58 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ clean:
test:
go test -v ./...

release:
env CGO_ENABLED=0 go build -o http2back_linux-amd64

.PHONY: fmt install clean test all
60 changes: 7 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,75 +25,29 @@ glide install && make
Once configured (see next section), just run the server :

```
./http2back
2017/10/09 23:51:47 Starting http server on localhost:4242 using provider Filesystem (/tmp)
./http2back filesystem --dest=/tmp
2017/10/11 11:30:44 Starting http server on 127.0.0.1:8080 using provider Filesystem (tmp)
```

Send something using the client of your choice :

```
curl -X PUT -F [email protected] http://localhost:4242/
curl -X PUT -F [email protected] http://127.0.0.1:8080/
```


# Configuration

As for now, configuration can only be done using a config file named http2back.{json, toml, yaml, hcl, properties}.
This config file has to be present in http2back classpath including : /etc/http2back, $HOME/.http2back or in the current directory.
Have a look at the sample file at the root of the repository : `http2back.yaml`

Configuration is easy (using yaml for the win):

```
bind_address: 127.0.0.1
port: 4242
provider:
name: <provider name>
[more provider opts]
```

# Providers

## Filesystem
Configuration is done using command arguments :

```
provider:
name: filesystem
dest: /tmp
./http2back [--bind=<binding-address>] [--port=<server-port>] COMMAND [OPTS]
```

## FTP

```
provider:
name: ftp
dest: /
host: host:port
username: user
password: pass
```

## AWS S3

```
provider:
name: s3
dest: /
bucket: my-bucket
region: eu-west-1
aws-access-key-id: my-access-key-id
aws-secret-access-key: my-secret-access-key
```

## Dropbox

First, you need to create an app and an associated token.
Each command corresponds to one provider, pop help using :

```
provider:
name: dropbox
token: <my api token>
dest: /myfiles
./http2back COMMAND help
```

# Dependencies
Expand Down
10 changes: 5 additions & 5 deletions cli/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
)

const (
appName = "http2back"
appDesc = "Push to backends over HTTP"
appVersion = "v0.1"
AppName = "http2back"
AppDesc = "Push to backends over HTTP"
AppVersion = "v0.2"
)

var (
Expand All @@ -20,8 +20,8 @@ var (
)

func Process() {
app := cli.App(appName, appDesc)
app.Version("v version", fmt.Sprintf("%s %s", appName, appVersion))
app := cli.App(AppName, AppDesc)
app.Version("v version", fmt.Sprintf("%s %s", AppName, AppVersion))

addr = app.StringOpt("b bind", "127.0.0.1", "Bind address")
port = app.IntOpt("p port", 8080, "Port to listen connections from")
Expand Down

0 comments on commit 53e7157

Please sign in to comment.