20 lines
452 B
Go
20 lines
452 B
Go
package commands
|
|
|
|
import (
|
|
web "codeberg.org/danjones000/lenore/app"
|
|
"github.com/spf13/cobra"
|
|
"log"
|
|
)
|
|
|
|
func run(cmd *cobra.Command, args []string) {
|
|
app := web.New()
|
|
log.Fatal(app.Listen(":3000"))
|
|
}
|
|
|
|
var AppCmd = &cobra.Command{
|
|
Use: "app",
|
|
Short: "Run the lenore webapp",
|
|
Long: `This is the main command. This will start the application, and keep it running.
|
|
You may want to run this from something like supervisor or systemd`,
|
|
Run: run,
|
|
}
|