Fork me on GitHub
#babashka
<
2021-12-27
>
borkdude17:12:16

@teodorlu about the http-server, I pulled it into a repo now:thread:

👍 1
borkdude17:12:21

#!/usr/bin/env bb

(require '[babashka.deps :as deps])
(deps/add-deps '{:deps {babashka/http-server {:git/url ""
                                              :git/sha "d1f01b47492dec245f3f6d297849ee038243ee86"}}})

(require '[babashka.http-server :as http-server])

(apply http-server/-main *command-line-args*)

borkdude17:12:47

if you save that script on your path, then you have an http server. the repo doesn't yet accept any options, so it's a very basic first start

teodorlu17:12:30

👍 Thanks!

borkdude17:12:09

I'm wondering if we could support something like:

bb add-tool :git/url ... :git/sha ... :as http-server

borkdude17:12:27

and it would save that script into ~/.babashka/tools which you could then add to your path or so

borkdude17:12:00

but you can also just add the http-server to your project bb.edn

borkdude17:12:14

and then invoke with bb tasks:

bb http-server

👍 2
teodorlu11:12:51

Does that mean you can add only that alias to the global bb.edn and use it from anywhere? Nice!

borkdude11:12:28

yeah you can do that too :)

❤️ 1
borkdude11:12:57

but I'm using this for my blog when writing posts, to view them locally

👍 1
teodorlu11:12:28

Yeah, same use case as I'm interested in. Having a look at your setup now, this is interesting 🙂

benny19:12:52

How would I use babashka (or babashka.process) to spawn a process which stdout,stderr I'm not interested in and outlives the babashka process itself?

1
benny19:12:03

Note to self: Don't just copy/paste from the README. I don't need the "check" as that blocks.

1
borkdude19:12:00

Did you answer your own question or do you need more info?