-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|