forked from pasztorpisti/nano
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
25 lines (22 loc) · 755 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package main
import (
"github.com/pasztorpisti/nano"
"github.com/pasztorpisti/nano/addons/transport/http"
"github.com/pasztorpisti/nano/examples/example1/api_go/svc2"
"github.com/pasztorpisti/nano/examples/example1/config/server"
svc_svc1 "github.com/pasztorpisti/nano/examples/example1/services/svc1"
svc_svc2 "github.com/pasztorpisti/nano/examples/example1/services/svc2"
svc_svc3 "github.com/pasztorpisti/nano/examples/example1/services/svc3"
svc_svc4 "github.com/pasztorpisti/nano/examples/example1/services/svc4"
)
func main() {
server.Init()
ss := nano.NewServiceSet(
svc_svc1.New(),
svc_svc2.New(),
svc_svc3.New(),
svc_svc4.New(),
)
listener := http.NewListener(nil, svc2.HTTPTransportConfig)
nano.RunServer(ss, listener)
}