Skip to content

Commit

Permalink
remove test.baseConfig from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
starius committed Jan 26, 2017
1 parent 70cce45 commit 51eba74
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
12 changes: 6 additions & 6 deletions examples/hello/main.lua
Original file line number Diff line number Diff line change
@@ -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()
12 changes: 6 additions & 6 deletions examples/luacheck/main.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local test = require 'luawt.test'
local luawt = require 'luawt'

local code = [[
local app, env = ...
Expand All @@ -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()

0 comments on commit 51eba74

Please sign in to comment.