Skip to content

Commit d0ffa1a

Browse files
committed
fix: add README
1 parent 324f263 commit d0ffa1a

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Lorem.space server
2+
The backend of https://lorem.space lives here.
3+
4+
## Features
5+
* Scan the directory & categorize the image resources (only JPEG for now)
6+
* Provide HTTP API
7+
* Resize the image resources
8+
* Cache option to store the resized image as a file
9+
10+
## How to run
11+
12+
`$ go run main.go`
13+
14+
`$ go run main.go --dir="/IMAGE/DIRECTORY/PATH"`
15+
16+
### Options
17+
18+
* `host`: host:port for the HTTP server (string)
19+
* `dir`: the path of image resources directory (string)
20+
* `cache`: enable cache (store the result as files in .cache directory) (bool)
21+
* `cdn`: CDN address to redirect to the cached file path, leave empty to write the file in the HTTP response (string)
22+
* `min-width`: minimum supported width (integer)
23+
* `max-width`: maximum supported width (integer)
24+
* `min-height`: minimum supported height (integer)
25+
* `max-height`: maximum supported height (integer)

0 commit comments

Comments
 (0)