Fork me on GitHub
#babashka
<
2022-12-14
>
avi14:12:16

👋 Hi all, does anyone know if we have, in our community, something akin to Python’s python3 -m http.server (née python2 -m SimpleHTTPServer) — a command/library/tool that starts a webserver that serves the current dir as a website with little to no ceremony?

borkdude14:12:23

@aviflax Yes :) https://github.com/babashka/http-server You can install it with

bbin install org.babashka/http-server --mvn/version 0.1.11
if you have bbin installed

avi14:12:33

lovely, thank you so much!

avi15:12:09

…let’s say my team members are likely to have bb installed but not bbin (I myself am not familiar with bbin yet, I guess I’m out of touch 😬 ) — is this available as a pod? Maybe this is out of date, but pods are how I’ve tended to add functionality to bb scripts, uh, on the fly, without additional ceremony or config files etc

avi15:12:30

…or maybe I should just have everyone install bbin

borkdude15:12:54

The readme also shows other ways of installing it

avi15:12:04

like using deps/add-deps

avi15:12:13

does that support gitlibs? I’m guessing probably; I’ll try it

avi15:12:17

(I prefer gitlibs)

avi15:12:26

I’ll give it a try — thanks!

borkdude15:12:56

yeah it does

avi15:12:17

great, thanks!

emccue19:12:51

@aviflax well...we run on the jvm so

emccue19:12:12

jwebserver

👍 1
emccue19:12:22

comes with newer jvms

avi19:12:14

TIL thanks!

Bobbi Towers01:12:53

you can also just type npx nbbserve if node is installed (I made it to test out making an npx command with nbb and it's come in very handy)

avi12:12:14

@U8LB00QMD cool, thanks!