Files
opencloud/ocis/pkg/command/server.go
Christian Richter a4d7696232 Move machine-auth-api-key to shared.Commons
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-04-26 10:20:15 +02:00

31 lines
718 B
Go

package command
import (
"github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/config/parser"
"github.com/owncloud/ocis/ocis/pkg/register"
"github.com/owncloud/ocis/ocis/pkg/runtime"
"github.com/urfave/cli/v2"
)
// Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: "start a fullstack server (runtime and all extensions in supervised mode)",
Category: "fullstack",
Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg)
},
Action: func(c *cli.Context) error {
r := runtime.New(cfg)
return r.Start()
},
}
}
func init() {
register.AddCommand(Server)
}