mirror of
https://gitee.com/johng/gf.git
synced 2024-12-05 05:37:55 +08:00
22 lines
378 B
Go
22 lines
378 B
Go
package main
|
|
|
|
import (
|
|
"gitee.com/johng/gf/g/net/ghttp"
|
|
)
|
|
|
|
func main() {
|
|
s1 := ghttp.GetServer("s1")
|
|
s1.SetAddr(":8080")
|
|
s1.SetIndexFolder(true)
|
|
s1.SetServerRoot("/home/www/static1")
|
|
go s1.Run()
|
|
|
|
s2 := ghttp.GetServer("s2")
|
|
s2.SetAddr(":8081")
|
|
s2.SetIndexFolder(true)
|
|
s2.SetServerRoot("/home/www/static2")
|
|
go s2.Run()
|
|
|
|
select{}
|
|
}
|