mirror of
https://codeberg.org/bunbun/bunbun.dev
synced 2025-06-07 20:49:56 -07:00
initial
This commit is contained in:
16
server.fnl
Normal file
16
server.fnl
Normal file
@ -0,0 +1,16 @@
|
||||
(local socket (require :socket))
|
||||
|
||||
(local handle-client (. (require :client-handler) :handle-client))
|
||||
|
||||
(local port 8080)
|
||||
(local server (socket.tcp))
|
||||
|
||||
(server:bind "*" port)
|
||||
(server:listen)
|
||||
|
||||
(while true
|
||||
(local client (server:accept))
|
||||
|
||||
(local co (coroutine.create (fn [] (handle-client client))))
|
||||
|
||||
(coroutine.resume co))
|
Reference in New Issue
Block a user