diff options
-rw-r--r-- | src/ninjacloud.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ninjacloud.go b/src/ninjacloud.go index 58146f7..235a9be 100644 --- a/src/ninjacloud.go +++ b/src/ninjacloud.go | |||
@@ -43,6 +43,8 @@ var rootFlag string | |||
43 | const driveName = "Z" | 43 | const driveName = "Z" |
44 | const drivePrefix = driveName + ":/" | 44 | const drivePrefix = driveName + ":/" |
45 | 45 | ||
46 | const projectsDir = "Ninja" | ||
47 | |||
46 | const filePath = "/file/" | 48 | const filePath = "/file/" |
47 | const dirPath = "/directory/" | 49 | const dirPath = "/directory/" |
48 | const webPath = "/web?url=" | 50 | const webPath = "/web?url=" |
@@ -629,7 +631,7 @@ func getStatusHandler(w http.ResponseWriter, r *http.Request) { | |||
629 | cloudStatus := map[string]string{ | 631 | cloudStatus := map[string]string{ |
630 | "name": APP_NAME, | 632 | "name": APP_NAME, |
631 | "version": APP_VERSION, | 633 | "version": APP_VERSION, |
632 | "server-root": drivePrefix, | 634 | "server-root": drivePrefix + projectsDir, |
633 | "status": "running", | 635 | "status": "running", |
634 | } | 636 | } |
635 | j, err := json.MarshalIndent(cloudStatus, "", " ") | 637 | j, err := json.MarshalIndent(cloudStatus, "", " ") |
@@ -662,6 +664,12 @@ func main() { | |||
662 | log.Println(err) | 664 | log.Println(err) |
663 | return | 665 | return |
664 | } | 666 | } |
667 | |||
668 | err = createDir(projectsDir) | ||
669 | if err != nil { | ||
670 | log.Println(err) | ||
671 | return | ||
672 | } | ||
665 | 673 | ||
666 | log.Println("Starting " + APP_NAME + " " + APP_VERSION + " on " + interfaceFlag + ":" + portFlag + " in " + currentDir) | 674 | log.Println("Starting " + APP_NAME + " " + APP_VERSION + " on " + interfaceFlag + ":" + portFlag + " in " + currentDir) |
667 | log.Println("pacien.net/projects/ninja-go-local-cloud") | 675 | log.Println("pacien.net/projects/ninja-go-local-cloud") |