A tool to migrate GitHub Repositories to Gitea including all issues
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
gitea-github-migrator/cmd/web.go

29 lines
686 B

package cmd
import (
"fmt"
"net/http"
"git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator/config"
"git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator/web"
"github.com/jinzhu/configor"
"github.com/urfave/cli"
)
// CmdWeb stars the web interface
var CmdWeb = cli.Command{
Name: "web",
Usage: "Starts the web interface",
Action: runWeb,
}
func runWeb(_ *cli.Context) error {
if err := configor.New(&configor.Config{ErrorOnUnmatchedKeys: true}).Load(&config.Config, "config.yml"); err != nil {
return err
}
r := web.InitRoutes()
fmt.Println("Server is running...")
// TODO add port / host to config
return http.ListenAndServe("0.0.0.0:4000", r)
}