Last active
July 5, 2022 09:51
-
-
Save henryw374/64cd72c243feae85c31947d35ad90278 to your computer and use it in GitHub Desktop.
babashka adhoc file server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bb | |
; run the script from any dir to serve its files | |
(require '[babashka.deps]) | |
(def deps '{:deps {io.github.babashka/http-server | |
{:git/sha "b38c1f16ad2c618adae2c3b102a5520c261a7dd3"}}}) | |
(babashka.deps/add-deps deps) | |
(require '[babashka.http-server :as http]) | |
(http/serve {:port 8080 :dir "."}) | |
(println "Serving static assets at http://localhost:8080") | |
@(promise) | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment