view src/luan/modules/http/test.luan @ 1178:49cf706c326a

serve_for_nginx on port 8081
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 13 Feb 2018 22:44:06 -0700
parents 1a68fc55a80c
children a50803fde972
line wrap: on
line source

local Luan = require "luan:Luan.luan"
local Io = require "luan:Io.luan"
local Server = require "luan:http/Server.luan"

if #{...} ~= 2 then
	Io.stderr.write "usage: luan luan:http/serve dir-URI test-URI\n"
	return
end

local dir, test = ...
Server.init(dir)
Luan.do_file(test)