mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Split main file
Added code to split the generated main file into two separate files. This allows other code to launch the web application inline.
This commit is contained in:
@@ -109,6 +109,7 @@ func runApp(c *model.CommandConfig) {
|
||||
if c.Run.Mode == "" {
|
||||
c.Run.Mode = "dev"
|
||||
}
|
||||
c.ImportPath = c.Run.ImportPath
|
||||
|
||||
revel_path := model.NewRevelPaths(c.Run.Mode, c.Run.ImportPath, "", model.DoNothingRevelCallback)
|
||||
if c.Run.Port != "" {
|
||||
|
||||
@@ -78,6 +78,7 @@ func testApp(c *model.CommandConfig) {
|
||||
if c.Test.Mode != "" {
|
||||
mode = c.Test.Mode
|
||||
}
|
||||
c.ImportPath = c.Test.ImportPath
|
||||
|
||||
// Find and parse app.conf
|
||||
revel_path := model.NewRevelPaths(mode, c.Test.ImportPath, "", model.DoNothingRevelCallback)
|
||||
|
||||
Reference in New Issue
Block a user