Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
sters committed Oct 26, 2021
1 parent aad82ce commit cc9fb27
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,50 @@
[![go-report](https://goreportcard.com/badge/github.com/sters/onstatic)](https://goreportcard.com/report/github.com/sters/onstatic)


onstatic is static page hosting controller.
The onstatic is static page hosting controller.

## Quick Start

Start application from [Releases](https://github.com/sters/onstatic/releases) or yourself.
```

```shell
go run cmd/server/main.go
```

Then, do register. Like this.
```

```shell
curl -X POST -H "X-ONSTATIC-KEY: onstaticonstaticonstatic" -H "X-ONSTATIC-REPONAME: [email protected]:sters/onstatic.git" localhost:18888/register
```

And you can get SSH Public Key that register to Your git repository's access authentication.

Finally, do pull. Like this:
```

```shell
curl -v -X POST -H "X-ONSTATIC-KEY: onstaticonstaticonstatic" -H "X-ONSTATIC-REPONAME: [email protected]:sters/onstatic.git" localhost:18888/pull
```

You can get hashed repository name. Try access `localhost:18888/{Hashed Repository Name}/{your file path}`.


## Plugins

See [plugins/example](plugins/example).

You need implement `EntryPoint` on [onstatic/plugin/api.go](onstatic/plugin/api.go).

Also you need set *.so file into `.onstatic` dir on top of your repository. Like this:

```text
- foobar_repository
- .onstatic
- foo.so
- bar.so
- other_dirs
- other_files
- more_other_files
```

## Other Informations

Expand Down

0 comments on commit cc9fb27

Please sign in to comment.