Mercurial Hosting > luan
comparison src/luan/modules/http/serve.luan @ 1756:a4b232aa0554
serve.luan - allow extra args
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Sun, 05 Feb 2023 22:08:50 -0700 |
| parents | af22d6c120e4 |
| children |
comparison
equal
deleted
inserted
replaced
| 1755:78cedcd6e1a4 | 1756:a4b232aa0554 |
|---|---|
| 3 local Io = require "luan:Io.luan" | 3 local Io = require "luan:Io.luan" |
| 4 local Server = require "luan:http/Server.luan" | 4 local Server = require "luan:http/Server.luan" |
| 5 local String = require "luan:String.luan" | 5 local String = require "luan:String.luan" |
| 6 local to_number = String.to_number or error() | 6 local to_number = String.to_number or error() |
| 7 | 7 |
| 8 local dir, port, extra = ... | 8 local dir, port = ... |
| 9 | 9 |
| 10 if dir==nil or extra~=nil then | 10 if dir==nil then |
| 11 Io.stderr.write "usage: luan luan:http/serve.luan dir [port]\n" | 11 Io.stderr.write "usage: luan luan:http/serve.luan dir [port]\n" |
| 12 return | 12 return |
| 13 end | 13 end |
| 14 | 14 |
| 15 if port ~= nil then | 15 if port ~= nil then |
