From d6149f5095024b71e48dfeeaecd51bbd1478267b Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Tue, 4 Oct 2016 16:28:03 -0700 Subject: updating some usage and API/Admin running method --- cmd/cms/main.go | 25 ++++++++++++++++--------- cmd/cms/options.go | 6 +++--- 2 files changed, 19 insertions(+), 12 deletions(-) (limited to 'cmd') diff --git a/cmd/cms/main.go b/cmd/cms/main.go index 87fce1c..c2f1bf1 100644 --- a/cmd/cms/main.go +++ b/cmd/cms/main.go @@ -41,22 +41,29 @@ generate, gen, g : -serve, s : +serve, s : Starts the 'cms' HTTP server for the JSON API, Admin System, or both. Must be given at least one (1) parameter. The segments describe - which services to start, in order, either 'admin' - (Admin System / CMS backend) or 'api' (JSON API), the port to which the - service is bound, and, optionally, if the server(s) should utilize TLS - encryption (served over HTTPS), which is automatically managed using - Let's Encrypt (https://letsencrypt.org) + which services to start, either 'admin' (Admin System / CMS + backend) or 'api' (JSON API), and, optionally, if the server(s) should + utilize TLS encryption (served over HTTPS), which is automatically managed + using Let's Encrypt (https://letsencrypt.org) Example: - $ cms serve admin:8080:tls api:8000 + $ cms serve admin|api 8080 tls (or) - $ cms serve admin:8080 + $ cms serve admin (or) - $ cms serve api:8000:tls + $ cms serve api 8888 + + Defaults to 'admin|api 8080' (running Admin & API on port 8080, without TLS) + + Note: + Admin and API cannot run on separate processes unless you use a copy of the + database, since the first process to open it recieves a lock. If you intend + to run the Admin and API on separate processes, you must call them with the + 'cms' command independently. ` func init() { diff --git a/cmd/cms/options.go b/cmd/cms/options.go index f95f800..94c809f 100644 --- a/cmd/cms/options.go +++ b/cmd/cms/options.go @@ -196,9 +196,9 @@ func createProjInDir(path string) error { gopath = gopath[:len(gopath)-1] gopath = filepath.Join(gopath, "src") - repo := "github.com/nilslice/cms" - local := filepath.Join(gopath, repo) - network := "https://" + repo + ".git" + repo := []string{"github.com", "nilslice", "cms"} + local := filepath.Join(gopath, filepath.Join(repo...)) + network := "https://" + strings.Join(repo, "/") + ".git" // create the directory or overwrite it err = os.MkdirAll(path, os.ModeDir|os.ModePerm) -- cgit v1.2.3