Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions frameworks/ring-http-exchange/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM clojure:temurin-26-lein-trixie AS builder
WORKDIR /app
ENV LEIN_SNAPSHOTS_IN_RELEASE=true
COPY project.clj ./
COPY resources ./resources
RUN lein deps
COPY src ./src
RUN lein with-profile uberjar uberjar

FROM eclipse-temurin:26-jre
ENV LEIN_SNAPSHOTS_IN_RELEASE=true
RUN mkdir -p /data/static
WORKDIR /app
COPY --from=builder /app/target/ring-0.1.0-standalone.jar /app/app.jar
Expand Down
1 change: 1 addition & 0 deletions frameworks/ring-http-exchange/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"sync-db",
"static",
"tcp-frag",
"fortunes",
"crud"
]
}
10 changes: 4 additions & 6 deletions frameworks/ring-http-exchange/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
:url "https://www.eclipse.org/legal/epl-2.0/"}

:dependencies [[org.clojure/clojure "1.12.0"]
[org.clojars.jj/ring-http-exchange "1.4.4"]
[org.clojars.jj/ring-http-exchange "1.4.5"]
[org.clojars.jj/tassu "1.0.4"]
[org.clojars.jj/boa-sql "1.0.10"]
[org.clojars.jj/next-jdbc-adapter "1.0.10"]
[org.postgresql/postgresql "42.7.5"]
[org.clojars.jj/async-boa-sql "1.0.11"]
[org.clojars.jj/vertx-pg-client-async-boa-adapter "1.0.1"]
[metosin/jsonista "1.0.0"]
[com.zaxxer/HikariCP "6.2.1"]
[org.clojars.jj/majavat "2.0.2-SNAPSHOT"]
[io.github.robaho/httpserver "1.0.29"]
[com.github.seancorfield/next.jdbc "1.3.1093"]
[org.clojure/core.cache "1.2.263"]]

:main ^:skip-aot ring.core
Expand Down
10 changes: 10 additions & 0 deletions frameworks/ring-http-exchange/resources/fortunes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head><title>Fortunes</title></head>
<body>
<table>
<tr><th>id</th><th>message</th></tr>
{% for f only in fortunes %}<tr><td>{{ f.id }}</td><td>{{ f.message }}</td></tr>
{% endfor %}</table>
</body>
</html>
5 changes: 4 additions & 1 deletion frameworks/ring-http-exchange/resources/sql/crud-update
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
UPDATE items SET name = :name, price = :price, quantity = :quantity WHERE id = :id
UPDATE items
SET name = :name, price = :price, quantity = :quantity
WHERE id = :id
RETURNING id
1 change: 1 addition & 0 deletions frameworks/ring-http-exchange/resources/sql/fortunes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT id, message FROM fortune
Loading
Loading