Update README.

Li Ian-Xue (b4283)Thu Sep 30 19:56:25+0300 2021

6896963

Update README.

README.md

11
# guile-pastebin
2+
23
A very simple pastebin written in Guile Scheme.
34
45
## How to run

1213
It was tested on Guile 2.2.7 and 3.0.7.  Many thanks to the Guile
1314
development team for such great software.
1415
16+
## API
17+
18+
- `/post` -- create paste
19+
  - method: POST only
20+
  - type: `multipart/form-data`
21+
  - fields
22+
    - `text` -- the paste content
23+
    - `showUrl=1` -- to show the raw URL after paste
24+
- `/raw/<ID>` -- get paste content
25+
  - method: GET only
26+
- Anything else -- show top 5 paste list
27+
28+
## Paste a file from command line
29+
30+
Paste a text file from command line and get a URL back:
31+
`curl -F "text=<helloworld.cs" -F showUrl=1 http://localhost:8080/post`
32+
33+
Notice the double-quotes around the parameters because `<` means IO
34+
redirection in sh.
35+
1536
## Reverse Proxy
1637
1738
It may be desirable to setup a reverse proxy on Apache Httpd (also a memo
1839
for myself), so you don't have to expose the 8080 or whatever port:
1940
2041
```
21-
    <Location "/pastebin">
22-
        ProxyPass "http://your_address:8080"
23-
        ProxyPassReverse "http://your_address:8080"
24-
        ProxyHTMLEnable On
25-
        ProxyHTMLDocType "<!DOCTYPE html>"
26-
        ProxyHTMLURLMap "/" "/pastebin/"
27-
    </Location>
42+
<Location "/pastebin">
43+
    ProxyPass "http://your_address:8080"
44+
    ProxyPassReverse "http://your_address:8080"
45+
    ProxyHTMLEnable On
46+
    ProxyHTMLDocType "<!DOCTYPE html>"
47+
    ProxyHTMLURLMap "/" "/pastebin/"
48+
</Location>
2849
```
2950