 (def root-dir (.resolve path "."))
 (def led nil)
 (def servo nil)
-(def bell-animation)
-(def animation-config {:duration 2000
-                       :cuePoints [0, 0.25, 0.5, 0.75, 1.0]
-                       :keyFrames [{:degrees 0}
-                                   {:degrees 135}
-                                   {:degrees 45}
-                                   {:degrees 180}
-                                   {:degrees 0}]})
+(def animation-config
+  (clj->js {:duration 2000
+            :cuePoints [0, 0.25, 0.5, 0.75, 1.0]
+            :keyFrames [{:degrees 0}
+                        {:degrees 135}
+                        {:degrees 45}
+                        {:degrees 180}
+                        {:degrees 0}]}))
 
 (defn- read-config []
   (->> (.readFileSync fs (str root-dir "/config.clj"))

        (set! led (js/five.Led. "GPIO16"))
        (set! servo
          (js/five.Servo (clj->js {:pin "GPIO18"})))
        (set! bell-animation
          (doto (js/five.Animation servo)
                (.enqueue (clj->js animation-config))))
        (next-fn)))))

(defn- init-web-server []

(defn- ring-bell! []
  (println "Ringing the bell!")
  (when io-enabled?
    (-> (js/five.Animation servo)
        (.enqueue animation-config))))

(defn- remove-content-encoding
  "Stash sends an invalid content-encoding header. Remove it from the request object if detected"
