From 30f2f46474bf4eda5f10d4c64a07cde01d469f66 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 15 Nov 2021 11:54:17 +0800 Subject: *rename DefaultContent -> BuiltIn --- .../Libraries/json4lua/examples/jsonrpc.lua | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 Data/DefaultContent/Libraries/json4lua/examples/jsonrpc.lua (limited to 'Data/DefaultContent/Libraries/json4lua/examples/jsonrpc.lua') diff --git a/Data/DefaultContent/Libraries/json4lua/examples/jsonrpc.lua b/Data/DefaultContent/Libraries/json4lua/examples/jsonrpc.lua deleted file mode 100644 index f265b8a..0000000 --- a/Data/DefaultContent/Libraries/json4lua/examples/jsonrpc.lua +++ /dev/null @@ -1,21 +0,0 @@ --- --- jsonrpc.lua --- Installed in a CGILua webserver environment (with necessary CGI Lua 5.0 patch) --- -require ('json.rpcserver') - --- The Lua class that is to serve JSON RPC requests -local myServer = { - echo = function (msg) return msg end, - average = function(...) - local total=0 - local count=0 - for i=1, table.getn(arg) do - total = total + arg[i] - count = count + 1 - end - return { average= total/count, sum = total, n=count } - end -} - -json.rpcserver.serve(myServer) \ No newline at end of file -- cgit v1.1-26-g67d0