Live data from Hacker News

Show HN: Curl lama.sh – sh to start a web server anywhere

lama.sh

1–9 of 9 posts

Re: Show HN: Curl lama.sh – sh to start a web server anywhere

#3
post #2

So, this just downloads a web server written in Go and runs it? Why isn't this more explicit?

That's exactly right.

However, it does the downloading/starting in a really convenient manner. I wanted something I could just quickly type into a terminal without having to browse some GitHub release page.

Re: Show HN: Curl lama.sh – sh to start a web server anywhere

#5
Fair warning to users, you should never ever pipe something from the web directly into a shell.

I'm sure the author here has good intentions but, this is aimed at beginners (I'll assume, doubt anyone reasonably experienced would humor this) and teaching them a terrible idea.

Re: Show HN: Curl lama.sh – sh to start a web server anywhere

#8

Fair warning to users, you should never ever pipe something from the web directly into a shell. I'm sure the author here has good intentions but, this is aimed at beginners (I'll assume, doubt anyone reasonably experienced would humor this) and teaching them a terrible idea.

Not sure this statements holds in this general form - it's a very good idea to be cautious what you execute, but curl | sh is not much different from running npx for example. It's difficult to know know what will actually be executed on your machine, but at least shell scripts can be inspected/audited (as compared to packages with 100 dependencies).

That said, prior to piping anything to a shell it's advisable to inspect what is about to be executed. That's why the lama.sh script is super simple, as is the code of the web server it downloads and executes.