Change from webp_server to webp-server.

Update RPM Spec.
This commit is contained in:
n0vad3v 2020-02-25 14:47:19 +08:00
parent 2fc7cc018c
commit 8bdffcc246
No known key found for this signature in database
GPG Key ID: 8D42A0E699E50639
3 changed files with 24 additions and 3 deletions

View File

@ -18,7 +18,7 @@ It will convert `jpg,jpeg,png` files by default, this can be customized by editi
### Size ### Size
* `webp_server` with `node_modules`: 43M * `webp_server` with `node_modules`: 43M
* `webp_server_go` single binary: 15M * `webp-server(go)` single binary: 15M
### Performance ### Performance
@ -27,7 +27,7 @@ It's basically between `ExpressJS` and `Fiber`, much faster than the `http` pack
### Convenience ### Convenience
* `webp_server`: Clone -> `npm install` -> run with `pm2` * `webp_server`: Clone -> `npm install` -> run with `pm2`
* `webp_server_go`: Download -> Run * `webp-server(go)`: Download -> Run
## Usage ## 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`. 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%. 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/;` 3. Let Nginx to `proxy_pass http://localhost:3333/;`
## TODO ## TODO

21
webp_server.spec Normal file
View File

@ -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