This commit is contained in:
flynn 2019-02-14 01:20:33 +01:00
parent af375b6ca5
commit 8efb3f2048
3 changed files with 25 additions and 10 deletions

15
run_production.sh Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
export DATABASE_URL="mysql://localhost:3306/cat_dev?user=cat_user&password=local-pass"
export APP_HOST="http://localhost:3000"
export PORT="3000"
export USER_API_URI="https://adams.ugent.be/oauth/api/current_user/"
export AUTHORIZE_URI="https://adams.ugent.be/oauth/oauth2/authorize/"
export ACCESS_TOKEN_URI="https://adams.ugent.be/oauth/oauth2/token/"
export OAUTH_CONSUMER_KEY="tomtest"
export OAUTH_CONSUMER_SECRET="blargh"
java \
-Dlogback.configurationFile=env/dev/resources/logback.xml \
-jar target/uberjar/cat.jar

View file

@ -3,15 +3,15 @@
[oauth.client :as oauth] [oauth.client :as oauth]
[mount.core :refer [defstate]] [mount.core :refer [defstate]]
[clojure.tools.logging :as log])) [clojure.tools.logging :as log]))
;
;(defstate consumer (defstate consumer
; :start (oauth/make-consumer :start (oauth/make-consumer
; (env :oauth-consumer-key) (env :oauth-consumer-key)
; (env :oauth-consumer-secret) (env :oauth-consumer-secret)
; (env :request-token-uri) (env :request-token-uri)
; (env :access-token-uri) (env :access-token-uri)
; (env :authorize-uri) (env :authorize-uri)
; :hmac-sha1)) :hmac-sha1))
(defn oauth-callback-uri (defn oauth-callback-uri
"Generates the oauth request callback URI" "Generates the oauth request callback URI"

View file

@ -5,7 +5,7 @@
[compojure.core :refer [defroutes GET POST]] [compojure.core :refer [defroutes GET POST]]
[ring.util.http-response :as response] [ring.util.http-response :as response]
[struct.core :as st] [struct.core :as st]
[clojure.tools.logginqg :as log] [clojure.tools.logging :as log]
[cat.layout :refer [error-page]] [cat.layout :refer [error-page]]
[clojure.string :as s])) [clojure.string :as s]))