|
@@ -1,19 +1,26 @@
|
|
|
# LogServer
|
|
# LogServer
|
|
|
Program that serves compressed files over http.
|
|
Program that serves compressed files over http.
|
|
|
|
|
|
|
|
|
|
+***
|
|
|
## Configuration
|
|
## Configuration
|
|
|
|
|
|
|
|
-Configuration file (config.json) must be located in the same place as executable
|
|
|
|
|
-TODO: allow change conifg location via command line arguments
|
|
|
|
|
|
|
+Configuration file (config.json) must be located in the same place as executable.
|
|
|
|
|
+
|
|
|
|
|
+TODO: allow change conifg location via command line arguments.
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+Options:
|
|
|
|
|
+
|
|
|
|
|
+**address** - IP serving address:port.
|
|
|
|
|
+
|
|
|
|
|
+**data** - A dictionary of string and _item_. String is a name that will be used as directory name in html page.
|
|
|
|
|
|
|
|
-**address** - IP serving address
|
|
|
|
|
-**data** - A dictionary of string and _item_.
|
|
|
|
|
-String is a name that will be used as directory name in html page.
|
|
|
|
|
**item** - Consists of 3 parts:
|
|
**item** - Consists of 3 parts:
|
|
|
* **path** - directory location in server
|
|
* **path** - directory location in server
|
|
|
* **ext** - file extension. All other files in directory mentioned above will be excluded
|
|
* **ext** - file extension. All other files in directory mentioned above will be excluded
|
|
|
* **compress** - if true files will be compressed in memory as tarball when served over web.
|
|
* **compress** - if true files will be compressed in memory as tarball when served over web.
|
|
|
|
|
|
|
|
|
|
+***
|
|
|
## Build
|
|
## Build
|
|
|
|
|
|
|
|
Simple as
|
|
Simple as
|
|
@@ -21,12 +28,13 @@ Simple as
|
|
|
go build
|
|
go build
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-For smallest executable
|
|
|
|
|
|
|
+For smallest executable size
|
|
|
``` sh
|
|
``` sh
|
|
|
GOOS=linux go build -ldflags="-s -w"
|
|
GOOS=linux go build -ldflags="-s -w"
|
|
|
upx --brute logserver
|
|
upx --brute logserver
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
+***
|
|
|
## License
|
|
## License
|
|
|
|
|
|
|
|
-[MIT](https://gogs.infcof.com/infcof/Logserver/LICENSE)
|
|
|
|
|
|
|
+[MIT](https://gogs.infcof.com/infcof/Logserver/src/master/LICENSE)
|