                  (io/resource "public/index.html"))))
 
 
-(defn -main [& args]
-  (initialize server-state (first args))
+(defn -main [config-path & args]
+  (initialize server-state config-path)
   (timbre/set-config! [:appenders :spit :enabled?] true)
   (timbre/set-config! [:shared-appender-config :spit-filename] (:logfile @server-state))
   (info "Starting twitter collector...")

(comment

  (initialize server-state "opt/server-config-1.edn")

  (def g (start-stream server-state))


  (info @server-state)
  (when (:http-server? @server-state)
    (run-server (site #'all-routes) {:port (:port @server-state) :join? false}))
  (let [{{:keys [follow track credentials]} :app} @server-state]
    (start-filter-stream follow track (partial stream-handler server-state) credentials))
  (when (:backup? @server-state)
    (start-executor (:backup-folder @server-state))))

