mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 11:03:12 +00:00
15 lines
415 B
Lua
15 lines
415 B
Lua
local skynet = require "skynet"
|
|
|
|
skynet.start(function()
|
|
local launcher = assert(skynet.launch("snlua launcher"))
|
|
skynet.name(".launcher", launcher)
|
|
|
|
if skynet.getenv "standalone" then
|
|
local datacenter = assert(skynet.newservice "datacenterd")
|
|
skynet.name("DATACENTER", datacenter)
|
|
end
|
|
assert(skynet.newservice "service_mgr")
|
|
assert(skynet.newservice(skynet.getenv "start" or "main"))
|
|
skynet.exit()
|
|
end)
|