From 51eba74917ed90755dbb10c40c3220ad6fa1d9c9 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Thu, 26 Jan 2017 02:03:09 +0100 Subject: [PATCH] remove test.baseConfig from examples --- README.md | 5 ----- examples/hello/main.lua | 12 ++++++------ examples/luacheck/main.lua | 12 ++++++------ 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 2fcecb5..e00d434 100644 --- a/README.md +++ b/README.md @@ -49,17 +49,12 @@ local code = [[ ]] local luawt = require 'luawt' -local test = require 'luawt.test' - --- File with config for server. -local wt_config = test.baseConfig() -- Start WServer with the code above. local server = luawt.WServer({ code = code, ip = '127.0.0.1', port = 8080, - wt_config = wt_config, }) server:start() server:waitForShutdown() diff --git a/examples/hello/main.lua b/examples/hello/main.lua index ad1fe7a..6176cd0 100644 --- a/examples/hello/main.lua +++ b/examples/hello/main.lua @@ -1,13 +1,13 @@ -local test = require 'luawt.test' +local luawt = require 'luawt' local module_file = io.open('./examples/hello/hello.lua', 'r') local code = module_file:read('*all') module_file:close() -local ip = '0.0.0.0' -local port = 12346 -local wt_config = test.baseConfig() -local server = test.createServer(code, ip, port, wt_config) - +local server = luawt.WServer({ + code = code, + ip = '0.0.0.0', + port = 12346, +}) server:start() server:waitForShutdown() diff --git a/examples/luacheck/main.lua b/examples/luacheck/main.lua index 322cd87..75f53e2 100644 --- a/examples/luacheck/main.lua +++ b/examples/luacheck/main.lua @@ -1,4 +1,4 @@ -local test = require 'luawt.test' +local luawt = require 'luawt' local code = [[ local app, env = ... @@ -23,10 +23,10 @@ local code = [[ end) ]] -local ip = '0.0.0.0' -local port = 12345 -local wt_config = test.baseConfig() -local server = test.createServer(code, ip, port, wt_config) - +local server = luawt.WServer({ + code = code, + ip = '0.0.0.0', + port = 12345, +}) server:start() server:waitForShutdown()