-
Notifications
You must be signed in to change notification settings - Fork 20
/
main.go
40 lines (36 loc) · 904 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package main
import (
"github.com/goal-web/contracts"
"github.com/goal-web/goal/app/controllers"
"github.com/goal-web/goal/bootstrap/core"
"github.com/goal-web/goal/routes"
"github.com/goal-web/http"
"github.com/goal-web/http/sse"
"github.com/goal-web/http/websocket"
"github.com/goal-web/session"
"github.com/goal-web/supports/signal"
"github.com/goal-web/views"
"syscall"
)
func main() {
app := core.Application(core.App{
QueueWorker: true,
SchedulingWorker: true,
})
app.RegisterServices(
views.NewService(),
http.NewService(
routes.Api,
routes.WebSocket,
routes.Sse,
controllers.Register,
),
session.NewService(),
sse.NewService(),
websocket.NewService(),
signal.NewService(syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT),
)
app.Call(func(console3 contracts.Console, input contracts.ConsoleInput) {
console3.Run(input)
})
}