bower install
npm install
grunt
please set IP address and key of your coronium server
_G.appId = "192.168.56.101"
_G.apiKey = "2d0aa65e-208e-4e70-993c-e36a34bac6aa"
corona SDK http://coronalabs.com and coronium cloud
- install with openSSH
- create account as ubuntu
- sudo ifconfig eth1 192.168.56.101 netmask 255.255.255.0 up
- append eth1 to /etc/network/interfaces
auto eth1
iface eth1 inet static
address 192.168.56.101
netmask 255.255.255.0
network 192.168.56.0
broadcast 192.168.56.255
- virtual box > preference >Network > HostOnlyAdapter > add
192.168.56.1
255.255.255.0
DHCP Server Off
- virtual box > Ubuntue > Network > HostAdapter 2
- testcase/unittest.lua
local _M =
{
{name="user add", desc = "",
evt = {name = "mod_user", API="addUser", page="view.page.mod_user"}},
}
addUser is defined in controller/mod_user.lua
- view/page/testcases.lua shows the list of unittest.lua and onRowTouch() to dispath the following event
_G.Router:dispatchEvent({name = row.id.evt.name}, row.id.evt.API, row.id.evt.page)
- controller/mod_user.lua receives the event
- model/user.lua create user model
- addUser to request coronium:registerUser
_M.addUser = function(page)
local user = userModel.create("test1@kwiksher.com", "12345678", "yamamoto", "naoya")
coronium:registerUser( user, function(ret)
table.print(ret)
composer.gotoScene(page, {params = { API = "addUser", model = user, result = ret.result, error = ret.error}})
end)
end