get running as global script working
This commit is contained in:
parent
589e48304f
commit
e2258daafa
3 changed files with 17 additions and 4 deletions
|
|
@ -1,2 +1,2 @@
|
||||||
{:backend-host "http://localhost:8080"}
|
;; {:backend-host "http://localhost:8080"}
|
||||||
;; {:backend-host "http://aemos:5008"}
|
{:backend-host "http://aemos:5008"}
|
||||||
|
|
|
||||||
7
snippets_cms.bb
Executable file
7
snippets_cms.bb
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bb
|
||||||
|
|
||||||
|
(ns snippets-cms
|
||||||
|
(:require [cli-cms.main]))
|
||||||
|
|
||||||
|
(when (= *file* (System/getProperty "babashka.file"))
|
||||||
|
(apply cli-cms.main/-main *command-line-args*))
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
(ns cli-cms.config)
|
(ns cli-cms.config
|
||||||
|
(:require
|
||||||
|
[babashka.fs :as fs]
|
||||||
|
[clojure.string :as str]))
|
||||||
|
|
||||||
(def config (read-string (slurp "config.edn")))
|
(def config
|
||||||
|
(let [project-root (str/join "/" (drop-last 3 (fs/components *file*)))
|
||||||
|
config-file-path (format "/%s/config.edn" project-root)]
|
||||||
|
(read-string (slurp config-file-path))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue