Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/public-api-server/cmd/run.go
2498 views
1
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
package cmd
6
7
import (
8
"github.com/gitpod-io/gitpod/common-go/log"
9
"github.com/gitpod-io/gitpod/public-api-server/pkg/server"
10
"github.com/spf13/cobra"
11
)
12
13
func init() {
14
rootCmd.AddCommand(runCommand)
15
}
16
17
var runCommand = &cobra.Command{
18
Use: "run",
19
Short: "Starts the service",
20
Version: Version,
21
Run: func(cmd *cobra.Command, args []string) {
22
cfg := getConfig()
23
24
if err := server.Start(log.Log, Version, cfg); err != nil {
25
log.WithError(err).Fatal("cannot start server")
26
}
27
},
28
}
29
30