Skip to content
This repository was archived by the owner on Apr 2, 2020. It is now read-only.

Commit d93bf6b

Browse files
committed
update README
1 parent 78a9724 commit d93bf6b

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
RUST_LOG=info
2+
PASTEBIN_REDIS_URL=redis://localhost:6379

README.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,29 @@ $ . ./start.sh
5151

5252
## Environment
5353

54-
Prefix: "PASTEBIN_"
54+
Prefix: `PASTEBIN_`
5555

56-
| var | default | unit | description |
57-
| -------------- | -------------- | ----------- | ----------------------------------------------------------- |
58-
| MAX_STORE_SIZE | 104857600 | byte | An ambiguous size count for controlling server memory usage |
59-
| MAX_POST_SIZE | 32768 | byte | Max length of POST request body |
60-
| MAX_EXPIRATION | 604800 | second | Max expiration time |
61-
| CLEAN_DURATION | 5000 | millisecond | GC interval |
62-
| ADDR | localhost:8088 | | Binding address |
63-
| CRYPT_KEY | magic | | Crypto key for short url |
56+
Shared Variable
57+
58+
| var | default | unit | description |
59+
| ------------- | -------------- | ---- | ------------------------------- |
60+
| ADDR | localhost:8088 | | Binding address |
61+
| CRYPT_KEY | magic | | Crypto key for short url |
62+
| MAX_POST_SIZE | 32768 | byte | Max length of POST request body |
63+
64+
Built-in Memory Store
65+
66+
| var | default | unit | description |
67+
| -------------- | --------- | ----------- | ----------------------------------------------------------- |
68+
| MAX_STORE_SIZE | 104857600 | byte | An ambiguous size count for controlling server memory usage |
69+
| MAX_EXPIRATION | 604800 | second | Max expiration time |
70+
| CLEAN_DURATION | 5000 | millisecond | GC interval |
71+
72+
Redis Store
73+
74+
| var | default | unit | description |
75+
| --------- | ------- | ---- | -------------------------------------------- |
76+
| REDIS_URL | | | set PASTEBIN_REDIS_URL to enable redis store |
6477

6578
### Example
6679

@@ -70,4 +83,5 @@ Prefix: "PASTEBIN_"
7083
RUST_LOG=info
7184
PASTEBIN_ADDR=localhost:8000
7285
PASTEBIN_CRYPT_KEY=MyImportantSecret
86+
PASTEBIN_REDIS_URL=redis://localhost:6379
7387
```

0 commit comments

Comments
 (0)