Mercurial Hosting > luan
view src/luan/modules/http/serve.luan @ 1802:ca98dee04e08 default tip
add Parsers.json_null
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 21 Apr 2024 21:25:15 -0600 |
parents | a4b232aa0554 |
children |
line wrap: on
line source
local Luan = require "luan:Luan.luan" local error = Luan.error local Io = require "luan:Io.luan" local Server = require "luan:http/Server.luan" local String = require "luan:String.luan" local to_number = String.to_number or error() local dir, port = ... if dir==nil then Io.stderr.write "usage: luan luan:http/serve.luan dir [port]\n" return end if port ~= nil then port = to_number(port) or error "port must be an integer" end Server.serve(dir,port)