From cc9fb275c3ae8c0d8325dea78bbc9d072b45f4e2 Mon Sep 17 00:00:00 2001 From: sters Date: Tue, 26 Oct 2021 16:11:54 +0900 Subject: [PATCH] up --- README.md | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5ba5f27..9b792d7 100644 --- a/README.md +++ b/README.md @@ -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: git@github.com: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: git@github.com: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