Skip to content

Instantly share code, notes, and snippets.

@pjstadig
Created February 25, 2022 14:18
Show Gist options
  • Select an option

  • Save pjstadig/734bf65c1d36a8cdffe2b373d0bfddb7 to your computer and use it in GitHub Desktop.

Select an option

Save pjstadig/734bf65c1d36a8cdffe2b373d0bfddb7 to your computer and use it in GitHub Desktop.

Revisions

  1. pjstadig created this gist Feb 25, 2022.
    15 changes: 15 additions & 0 deletions main.clj
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    (ns stadig.main
    (:require
    [stadig.storage :as storage]
    [stadig.storage.s3 :refer [->S3Storage]]))

    (defn -main
    [& args]
    ;; ... initialize some things ...
    (let [access-key (System/getenv "AWS_ACCESS_KEY_ID")
    secret-key (System/getenv "AWS_SECRET_ACCESS_KEY")
    storage-conn (->S3Storage access-key secret-key)]
    (try
    ;; ... initialize some more things, or maybe just do stuff ...
    (finally
    (storage/close storage-conn)))))