Skip to content

Commit

Permalink
Run on application.garden
Browse files Browse the repository at this point in the history
  • Loading branch information
Sohalt committed Feb 23, 2024
1 parent ab7d3a9 commit 9f0676a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
8 changes: 4 additions & 4 deletions deps-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -343,16 +343,16 @@
"hash": "sha256-n3qR8COqb33JF/5OlzXSzTj1kGBZpMrZLWinyMTSyxk="
},
{
"mvn-path": "http-kit/http-kit/2.8.0-SNAPSHOT/http-kit-2.8.0-20231011.124634-3.jar",
"mvn-path": "http-kit/http-kit/2.8.0-SNAPSHOT/http-kit-2.8.0-20240222.135109-5.jar",
"snapshot": "http-kit-2.8.0-SNAPSHOT.jar",
"mvn-repo": "https://repo.clojars.org/",
"hash": "sha256-kYQu+xi6N47xBd0TWSTObZrJy8TkiVSpxbZt5mAk8n4="
"hash": "sha256-Fya7GBbOrl8bCX1m0wwOnyeT37wqV5FjzVe+cnHlj+w="
},
{
"mvn-path": "http-kit/http-kit/2.8.0-SNAPSHOT/http-kit-2.8.0-20231011.124634-3.pom",
"mvn-path": "http-kit/http-kit/2.8.0-SNAPSHOT/http-kit-2.8.0-20240222.135109-5.pom",
"snapshot": "http-kit-2.8.0-SNAPSHOT.pom",
"mvn-repo": "https://repo.clojars.org/",
"hash": "sha256-b1qoXjmER6AUB7oQxYFWBf2L/B5oRoW6W9dwOG8Y3pE="
"hash": "sha256-rnfEptH0GFLM0iBpyAqO7BMElW9qyV7HUYdEGvq0D6U="
},
{
"mvn-path": "io/github/nextjournal/clerk/0.15.957/clerk-0.15.957.jar",
Expand Down
4 changes: 3 additions & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
org.babashka/cli {:mvn/version "0.7.53"}
io.github.nextjournal/markdown {:mvn/version "0.5.146"}}
:aliases
{:dev {:extra-deps {io.github.nextjournal/clerk {:mvn/version "0.15.957"}}
{:nextjournal/garden {:exec-fn net.sohalt.solisplit.main/start!
:exec-args {:ip "0.0.0.0"}}
:dev {:extra-deps {io.github.nextjournal/clerk {:mvn/version "0.15.957"}}
:extra-paths ["dev"]}
:test {:extra-deps {}
:extra-paths ["test"]}}}
1 change: 1 addition & 0 deletions garden.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{:project "solisplit"}
7 changes: 5 additions & 2 deletions src/net/sohalt/solisplit/routes.clj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
(defonce !shares (atom {}))
(defonce !person->share (atom {}))

(def server-address (or (System/getenv "SERVER_ADDRESS") "http://localhost:8090"))
(def server-address (or (System/getenv "SERVER_ADDRESS")
(System/getenv "GARDEN_URL")
"http://localhost:8090"))

(defn person->share [person-id]
(let [share-id (@!person->share person-id)]
Expand Down Expand Up @@ -340,7 +342,8 @@

(defn routes []
[["/healthcheck" {:get handle-healthcheck}]
["/" {:get home}]
["/" {:get home
:head (constantly {:status 200})}]
["/share"
["/" {:get create-project-form
:post handle-create-share}]
Expand Down

0 comments on commit 9f0676a

Please sign in to comment.