forked from x/icebergs
opt serve
This commit is contained in:
parent
1f9b916285
commit
4749dab18d
@ -753,13 +753,16 @@ var Index = &ice.Context{Name: "web", Help: "网络模块",
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}},
|
}},
|
||||||
ice.WEB_SERVE: {Name: "serve [shy|dev|self]", Help: "服务器", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
ice.WEB_SERVE: {Name: "serve", Help: "服务器", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
// 启动服务
|
// 启动服务
|
||||||
m.Conf(ice.CLI_RUNTIME, "node.name", m.Conf(ice.CLI_RUNTIME, "boot.hostname"))
|
m.Conf(ice.CLI_RUNTIME, "node.name", m.Conf(ice.CLI_RUNTIME, "boot.hostname"))
|
||||||
m.Conf(ice.CLI_RUNTIME, "node.type", ice.WEB_SERVER)
|
m.Conf(ice.CLI_RUNTIME, "node.type", ice.WEB_SERVER)
|
||||||
m.Target().Start(m, "self")
|
m.Target().Start(m, "self")
|
||||||
// 连接服务
|
// 连接服务
|
||||||
m.Cmd(ice.WEB_SPACE, "connect", "self")
|
m.Cmd(ice.WEB_SPACE, "connect", "self")
|
||||||
|
for _, k := range arg {
|
||||||
|
m.Cmd(ice.WEB_SPACE, "connect", k)
|
||||||
|
}
|
||||||
}},
|
}},
|
||||||
ice.WEB_SPACE: {Name: "space", Help: "空间站", Meta: kit.Dict("exports", []string{"pod", "name"}), List: kit.List(
|
ice.WEB_SPACE: {Name: "space", Help: "空间站", Meta: kit.Dict("exports", []string{"pod", "name"}), List: kit.List(
|
||||||
kit.MDB_INPUT, "text", "name", "name",
|
kit.MDB_INPUT, "text", "name", "name",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user