News for hackers. Stuff that matters.
Re:Big list of HTTP static server one-liners by bawolff on Thursday May 13, 2021 @06:46AM (#27140657)
Weird to call these one liners, they're just invocation commands.

By that logic, apache is a one-liner.

Re:Big list of HTTP static server one-liners by oss2020 on Thursday May 13, 2021 @09:55AM (#27142115)
With that logic there are no one-liners. Even binary code is just an abstraction interpreted by microcode.

The point is that there is a working http server already installed on your machine. And you just need to run this one simple, memorable command to use it.

Very useful if you just want to quickly copy some files from A to B in your LAN or WAN (wouldn't use it over Internet because not encrypted).

Re:Big list of HTTP static server one-liners by forgotpwd16 on Thursday May 13, 2021 @06:59AM (#27140727)
Apache requires configuration. The point of those is that they're opening ad hoc an HTTP server without requiring any configuration.

Edit: Someone has posted an Apache example: https://gist.github.com/willurd/5720255#gistcomment-3050599

Re:Big list of HTTP static server one-liners by niklasrde on Thursday May 13, 2021 @06:55AM (#27140704)
apache requires a config file. I guess you could put any relevant config into a single line and pipe that through somehow, but it would be a lot more than a single command to define a directory and a port to serve.
Re:Big list of HTTP static server one-liners by bawolff on Thursday May 13, 2021 @11:53AM (#27143524)
PHP was on the list. It also takes a config file (less relavent though to this use)