-
Notifications
You must be signed in to change notification settings - Fork 13
/
main.go
41 lines (31 loc) · 1.04 KB
/
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
41
/*
copyright 2020 the Goployer authors
licensed under the apache license, version 2.0 (the "license");
you may not use this file except in compliance with the license.
you may obtain a copy of the license at
http://www.apache.org/licenses/license-2.0
unless required by applicable law or agreed to in writing, software
distributed under the license is distributed on an "as is" basis,
without warranties or conditions of any kind, either express or implied.
see the license for the specific language governing permissions and
limitations under the license.
*/
package main
import (
"net/http"
Logger "github.com/sirupsen/logrus"
"github.com/DevopsArtFactory/goployer/pkg/server"
)
func main() {
Logger.Infof("Booting up goployer server")
s := server.New().
SetDefaultSetting().
SetRouter()
Logger.Infof("Server setting is done")
addr := s.GetAddr()
s.Logger.Infof("Start goployer server")
if err := http.ListenAndServe(addr, s.Router); err != nil {
s.Logger.Errorf(err.Error())
}
s.Logger.Infof("Shutting down goployer server")
}