Blame view

src/main.lua 587 Bytes
314bc5df   zhengshouren   提交服务器初始代码
1
2
3
4
5
6
7
  local skynet = require "skynet"
  
  local max_client = 64
  
  skynet.start(function()
  	print("Server start")
  	skynet.newservice("console")
3a694834   zhengshouren   修改默认配置
8
  	skynet.newservice("debug_console", 10001)
314bc5df   zhengshouren   提交服务器初始代码
9
  
3a694834   zhengshouren   修改默认配置
10
  	local ngxd = skynet.newservice("services/ngxd", 11001)
314bc5df   zhengshouren   提交服务器初始代码
11
12
  	local watchdog = skynet.newservice("services/watchdog", max_client)
  	skynet.call(watchdog, "lua", "start", {
3a694834   zhengshouren   修改默认配置
13
  		port = 12001,
314bc5df   zhengshouren   提交服务器初始代码
14
15
16
17
  		maxclient = max_client,
  		ngxd = ngxd,
  
  		redishost = "127.0.0.1",
b8a42026   zhengshouren   没必要提交的文件
18
19
  		redisport = 6100,
  		redisdb = 1,
314bc5df   zhengshouren   提交服务器初始代码
20
21
22
23
24
25
26
27
28
29
  		auth = nil,
  
  		mongohost = "127.0.0.1",
  		mongoport = nil,
  		mongouser = nil,
  		mongopswd = nil,
  	})
  
  	skynet.exit()
  end)