diff options
author | KatolaZ <katolaz@freaknet.org> | 2017-07-03 10:40:48 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2017-07-03 10:40:48 +0100 |
commit | cd95aa3dc71bec3d15541424f328b6f3735432f1 (patch) | |
tree | d3235f3fc30809b2cb9a31f6e64c88fc817af184 /README.md | |
parent | e29d79e5f9785d039175da43704d02907b54ab47 (diff) |
config options reorganised. More robust config parser.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -1,23 +1,23 @@ -## binit -- minimal pastebin-like in 100 lines of golang +## binit -- minimal pastebin-like in golang That's just it. Preliminary version of a minimal, no-fuss pastebin-like service in golang. -Needs a folder "pastes/" to exist on the same dir where the program is -run from. At the moment, it binds on `localhost:8000` and serves -pastes in the format: +It serves pastes in the format: - localhost:8000/abcdef1234567890 + mypasteserver.org/abcdef1234567890 -The unique ID of a paste is obtained from the SHA256 of the -concatenation of title, time, and content. Rendering is minimal, but -can be enhanced. +and stores them in a folder, one file per paste, whose filename is +equal to the paste ID. The unique ID of a paste is obtained from the +SHA256 of the concatenation of title, time, and content. Rendering is +minimal, but can be enhanced. `binit` is currently configured through a simple key=value configuration file. The available options are: -* host (the hostname to listen on) -* port (the port to bind) +* server\_name (the FQDN where the service is reachable from outside) +* bind\_addr (the address to listen on) +* bind\_port (the port to bind) * paste\_dir (the folder where pastes are kept) * templ\_dir (the folder where HTML files and templates are kept) * max_size (the maximum allowed length of a paste, in bytes. Larger @@ -26,4 +26,4 @@ configuration file. The available options are: ### TODO -* Add a simple template system +* reorganise the code for paste storage/retrieve |