4 ms·
I believe the most complete solution is a full unix environment with shell piping the image stream. so i make https://bash.rocks https://bash.rocks, which is a
by wsxiaoys 9y ago
I believe the most complete solution is a full unix environment with shell piping the image stream. so i make https://bash.rocks https://bash.rocks, which is a web frontend backed by a unix environment.
Snippets:
1. Resizing with imagemagick: https://bash.rocks/Gxlg31/3 https://bash.rocks/Gxlg31/3
2. Resizing and convert to webp: https://bash.rocks/7J1jgB/1 https://bash.rocks/7J1jgB/1
After creating the snippet, you could either use GET https://bash.rocks/0Be95B https://bash.rocks/0Be95B (query parameters become environment variable) or POST https://bash.rocks/jJggWJ https://bash.rocks/jJggWJ (request body become stdin).
It's not hard to roll your backend like this for private usage (simply exec from node). I'm also working on an open source release.
- wsxiaoys 9y agoAnd now the backend (running arbitrary unix command as http service) is open sourced at https://github.com/bashrocks/shebang https://github.com/bashrocks/shebang