Skip to content

Commit

Permalink
wip: bridge networking
Browse files Browse the repository at this point in the history
  • Loading branch information
vito committed Aug 14, 2022
1 parent ed9a5a5 commit aba2dd8
Show file tree
Hide file tree
Showing 7 changed files with 367 additions and 79 deletions.
10 changes: 5 additions & 5 deletions demos/addrs.bass
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
; a simple server that returns a static index
(defn http-server [port index]
(defn http-server [index]
(from (linux/python)
(-> ($ python -m http.server (str port))
(-> ($ python -m http.server)
(with-mount (mkfile ./index.html index) ./index.html)
(with-port :http port))))
(with-port :http 8000))))

(defn main []
; construct a couple of server thunks (doesn't start them)
(let [hello (http-server 1111 "hello,")
world (http-server 2222 "world!")]
(let [hello (http-server "hello,")
world (http-server "world!")]
; curl both thunk addrs
;
; starts the two servers, waits for the ports to be ready, and resolves to
Expand Down
Loading

0 comments on commit aba2dd8

Please sign in to comment.