mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-23 07:21:28 +00:00
Adds harness from 'revel/revel' and updates imports
This commit is contained in:
@@ -2,7 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"github.com/revel/revel"
|
||||
"github.com/revel/revel/harness"
|
||||
"github.com/revel/cmd/harness"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
@@ -59,11 +59,13 @@ func runApp(args []string) {
|
||||
|
||||
// If the app is run in "watched" mode, use the harness to run it.
|
||||
if revel.Config.BoolDefault("watch", true) && revel.Config.BoolDefault("watch.code", true) {
|
||||
revel.TRACE.Println("Running in watched mode.")
|
||||
revel.HttpPort = port
|
||||
harness.NewHarness().Run() // Never returns.
|
||||
}
|
||||
|
||||
// Else, just build and run the app.
|
||||
revel.TRACE.Println("Running in live build mode.")
|
||||
app, err := harness.Build()
|
||||
if err != nil {
|
||||
errorf("Failed to build app: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user