diff --git a/README.md b/README.md index 16ac364..eca0121 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ It will convert `jpg,jpeg,png` files by default, this can be customized by editi ### Size * `webp_server` with `node_modules`: 43M -* `webp_server_go` single binary: 15M +* `webp-server(go)` single binary: 15M ### Performance @@ -27,7 +27,7 @@ It's basically between `ExpressJS` and `Fiber`, much faster than the `http` pack ### Convenience * `webp_server`: Clone -> `npm install` -> run with `pm2` -* `webp_server_go`: Download -> Run +* `webp-server(go)`: Download -> Run ## Usage @@ -36,7 +36,7 @@ If you are serving images at `https://example.com/pics/tsuki.jpg` and your files are at `/var/www/image/pics/tsuki.jpg`, then `IMG_PATH` shall be `/var/www/image`. 1. Edit the `config.json` to face your need, default convert quality is 80%. -2. Run the binary like this: `./webp_server`, use `screen` or `tmux` to hold it currently. +2. Run the binary like this: `./webp-server --config /path/to/config.json`, use `screen` or `tmux` to hold it currently. 3. Let Nginx to `proxy_pass http://localhost:3333/;` ## TODO diff --git a/webp_server.go b/webp-server.go similarity index 100% rename from webp_server.go rename to webp-server.go diff --git a/webp_server.spec b/webp_server.spec new file mode 100644 index 0000000..810118d --- /dev/null +++ b/webp_server.spec @@ -0,0 +1,21 @@ +Name: webp-server +Version: 0.0.2 +Release: 1%{?dist} +Summary: Go version of WebP Server. A tool that will serve your JPG/PNGs as WebP format with compression, on-the-fly. + +License: GPLv3 +Source0: webp-server +URL: https://github.com/n0vad3v/webp_server_go + +%description +Go version of WebP Server. A tool that will serve your JPG/PNGs as WebP format with compression, on-the-fly. + +%install +%{__mkdir} -p %{buildroot}/%{_bindir} +install -p -m 755 %{SOURCE0} %{buildroot}/%{_bindir} + +%files +%{_bindir}/webp-server + +%changelog +