Skip to content

Commit

Permalink
added gorilla
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdartysh committed Dec 4, 2019
1 parent 3997106 commit f34ecb9
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
@@ -0,0 +1,12 @@
FROM clojure:lein-2.7.1-alpine

ADD gorilla /app/
ADD src /app/src/

EXPOSE 9090


WORKDIR /app


ENTRYPOINT ["/app/docker-entrypoint-gorilla.sh"]
8 changes: 8 additions & 0 deletions gorilla/docker-entrypoint-gorilla.sh
@@ -0,0 +1,8 @@
#!/bin/bash

cd /app
lein gorilla :port 9090 :ip 0.0.0.0


sleep 300

10 changes: 10 additions & 0 deletions gorilla/project.clj
@@ -0,0 +1,10 @@
(defproject gorilla-uawa "0.1.0-SNAPSHOT"
:dependencies [
[org.clojure/clojure "1.8.0"]
[org.clojure/data.json "0.2.6"]
[org.clojure/java.jdbc "0.7.0-beta4"]
]
:main ^:skip-aot gorilla-test.core
:target-path "target/%s"
:plugins [[lein-gorilla "0.4.0"]]
:profiles {:uberjar {:aot :all}})
29 changes: 29 additions & 0 deletions gorilla/uawa
@@ -0,0 +1,29 @@
;; gorilla-repl.fileformat = 1

;; **
;;; # Uawa
;; **

;; @@
(use 'uawa.core)
;; @@
;; =>
;;; {"type":"html","content":"<span class='clj-nil'>nil</span>","value":"nil"}
;; <=

;; @@
(ціна ціна-груші 100 грн)
(функція розрахуй-вартість [ціна-за-єдиницю кількість] (домнож ціна-за-єдиницю кількість))
(друкуй (розрахуй-вартість ціна-груші 10))
;; @@
;; ->
;;; 1000 UAH
;;;
;; <-
;; =>
;;; {"type":"html","content":"<span class='clj-nil'>nil</span>","value":"nil"}
;; <=

;; @@

;; @@

0 comments on commit f34ecb9

Please sign in to comment.