mirror of
https://codeberg.org/bunbun/bunbun.dev
synced 2025-06-07 20:29:55 -07:00
added arguments and support for running locally
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
|
||||
(local handle-client (. (require :client-handler) :handle-client))
|
||||
|
||||
(local port 50625)
|
||||
(local port _G.port)
|
||||
(local server (socket.tcp))
|
||||
|
||||
(server:bind "*" port)
|
||||
@ -22,8 +22,9 @@
|
||||
|
||||
(set (_G.client-address _G.client-port) (client:getpeername))
|
||||
|
||||
(set client (ssl.wrap client params))
|
||||
(client:dohandshake)
|
||||
(when (not _G.use-http)
|
||||
(set client (ssl.wrap client params))
|
||||
(client:dohandshake))
|
||||
|
||||
(let [co (coroutine.create (fn [] (handle-client client)))]
|
||||
(coroutine.resume co)))
|
||||
|
Reference in New Issue
Block a user