Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very nice. I had cobbled up a "one liner" (sort of) gawk webserver on here a couple a months ago: https://news.ycombinator.com/item?id=22085459

I tried making it scalable, but unfortunately, the server sockets in gawk don't set SO_REUSEPORT. So, I can't fork usable children. It does work if you use LD_PRELOAD tricks, or edit the gawk binary to change SO_REUSEADDR to SO_REUSEPORT, but both are pretty hacky.

If gawk would separate the listen() and accept() calls out, you could do a lot more with their server socket code.



Very cool. Works on iOS with iSH surprisingly.

    FOUND index.html
    FOUND favicon.ico


Oh wow. I wouldn't have guessed iSH would have packaged up the extensions I'm using.


Had to `apk add gawk` is all.


impressive, if I use -o option to get a pretty printed version, it comes to 68 lines




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: