7 ms·
BASH Stack – Bash Awk Sed HTMX web framework
- elchief 3y agoNot mine, just saw it today, and thought it was interesting https://github.com/cgsdev0/bash-stack https://github.com/cgsdev0/bash-stack
- dredmorbius 3y agoA description / example of what this actually does would be useful.
- elchief 3y agoIt's a real simple web framework that uses shell files to return responses
- wruza 3y agoExamples: https://github.com/cgsdev0/bash-stack/tree/main/examples https://github.com/cgsdev0/bash-stack/tree/main/examples Overview describes what it does, really. Sends stdout of shell scripts to a client through http, routing via folders. “What a complicated bs!” I thought about this principle back in the day. Sigh.
- 998244353 3y agoSo... basically like cgi_bin?
- wruza 3y agoWe avoid using obsolete deprecated terms for the same things here in webdev. It’s neither amazing, nor awesome.
- dredmorbius 3y agoThank you!
- replwoacause 3y agoFrom the repo: “This project is intended for educational / entertainment purposes only. In its current implementation, it is riddled with security issues, and it would probably be extremely irresponsible to use this for any sort of production grade web service. ...having said that, if you happen to use it for anything, I'd love to hear about it!” So looks like a toy project for a bit of fun. Would like to see an example of what it does anyway though.
- b33j0r 3y agoAs of now, seems we’ve had too much fun with the demo. I didn’t get to see it. The github page says “see the docs!” for all info, which appears to be (on its face) stored with the demo, heh. Fun one!
- chii 3y agogood old CGI is making a comeback.
- fizx 3y agoCGI was the OG serverless, because it was a process-per-request model until e.g. fastcgi came along. Put scripts on an S3 backed filesystem, and as you grow, wrap them in a container, then an auto-scaling group. It might even work today! I'm surprised I haven't seen more of this from the anti-Kubernetes crowd.
- nurettin 3y agoMaybe they aren't a fan of S3.
- tempodox 3y agoCan it harass my users with push notifications?
- toastal 3y agoJoke? Push notifications have a lot of valid use cases for web apps even if they are useless (or harmful) for web pages. The platform is shared between the two categories.
- giantrobot 3y agoPush notifications are cancer. Push notifications are used a hundred times more for spam than they are some above board legitimate purpose. Even legitimate users have marketing departments foaming at the mouth to push ads with them.
- hkt 3y agoMore importantly, can it aggressively fingerprint them and supply adtech companies with an approximation of their identity?
- ithkuil 3y agoHow hard would it be to make bash be the only dependency (and not require tcpserver)? Iirc bash has some built-in support for networking but perhaps it's only for clients?
- micheljansen 3y agoBack in the day all you needed was CGI and Bash (though Perl was often the better choice) http://underpop.online.fr/c/cgi/docs/creating-cgi-programs-with-bash/amp.htm http://underpop.online.fr/c/cgi/docs/creating-cgi-programs-w...
- ithkuil 3y agoYes but you needed a web server that then invoked your CGI binary. I meant a truly pure bash server
- forgotpwd16 3y agoA pure bash web server is indeed possible using a loadable builtin. See: https://github.com/dzove855/Bash-web-server https://github.com/dzove855/Bash-web-server (discussed: https://news.ycombinator.com/item?id=29794979 https://news.ycombinator.com/item?id=29794979).
- ithkuil 3y agoBut this isn't pure bash. It requires a shared library you have to compile.
- forgotpwd16 3y ago>It requires a shared library you have to compile. Library is part of bash and patch is for supporting multiple connections. On vers>=5.2 patch is included so no need to compile anything.
- meepmorp 3y agoNot sure about bash, but iirc, zsh’s tcp module has a proxy function to listen on a port and pass input to a shell command.
- forgotpwd16 3y agoOther similar projects require a CGI-capable web server. This one instead uses djb's tcpserver. Guess next step will be to drop any external dependencies.
- BeefySwain 3y agoIn a similar vein: https://github.com/PyHAT-stack/awesome-python-htmx https://github.com/PyHAT-stack/awesome-python-htmx
- dmux 3y agoI was actually just playing around with AWK as a backend for CGI. Busybox provides both an AWK implementation as well as an httpd server that supports cgi hosting (https://openwrt.org/docs/guide-user/services/webserver/http.httpd https://openwrt.org/docs/guide-user/services/webserver/http....). AWK is definitely limited as a language, but IMO it’s a saner choice than going with BASH. It’s also been interesting to integrate with SQLite by interfacing with it through AWK’s “pipe to variable” mechanism.
- keyb1nd 3y agoThis is the best thing ever made for modern development
- Woshiwuja 3y agoThis looks great lol