From 8efb3f20488bedace09bc2d9bd537e02633a4c61 Mon Sep 17 00:00:00 2001 From: flynn Date: Thu, 14 Feb 2019 01:20:33 +0100 Subject: [PATCH] fix shit --- run_production.sh | 15 +++++++++++++++ src/clj/cat/oauth.clj | 18 +++++++++--------- src/clj/cat/routes/home.clj | 2 +- 3 files changed, 25 insertions(+), 10 deletions(-) create mode 100755 run_production.sh diff --git a/run_production.sh b/run_production.sh new file mode 100755 index 0000000..2bdcb6e --- /dev/null +++ b/run_production.sh @@ -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 \ No newline at end of file diff --git a/src/clj/cat/oauth.clj b/src/clj/cat/oauth.clj index e122d93..7d1c06f 100644 --- a/src/clj/cat/oauth.clj +++ b/src/clj/cat/oauth.clj @@ -3,15 +3,15 @@ [oauth.client :as oauth] [mount.core :refer [defstate]] [clojure.tools.logging :as log])) -; -;(defstate consumer -; :start (oauth/make-consumer -; (env :oauth-consumer-key) -; (env :oauth-consumer-secret) -; (env :request-token-uri) -; (env :access-token-uri) -; (env :authorize-uri) -; :hmac-sha1)) + +(defstate consumer + :start (oauth/make-consumer + (env :oauth-consumer-key) + (env :oauth-consumer-secret) + (env :request-token-uri) + (env :access-token-uri) + (env :authorize-uri) + :hmac-sha1)) (defn oauth-callback-uri "Generates the oauth request callback URI" diff --git a/src/clj/cat/routes/home.clj b/src/clj/cat/routes/home.clj index 42a38ef..8edcd80 100644 --- a/src/clj/cat/routes/home.clj +++ b/src/clj/cat/routes/home.clj @@ -5,7 +5,7 @@ [compojure.core :refer [defroutes GET POST]] [ring.util.http-response :as response] [struct.core :as st] - [clojure.tools.logginqg :as log] + [clojure.tools.logging :as log] [cat.layout :refer [error-page]] [clojure.string :as s]))