Created
January 24, 2021 23:30
-
-
Save csm/24f4706e3771ed75b52df57ea1816bce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Start a in-memory S3-compatible (kinda...) server. | |
Uses https://github.com/csm/s4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:deps {org.clojure/clojure {:mvn/version "1.10.1"} | |
s4 {:local/root "/Users/csm/src/s4/"} | |
aleph {:mvn/version "0.4.6"} | |
io.netty/netty-codec-http {:mvn/version "4.1.53.Final"} | |
io.netty/netty-codec {:mvn/version "4.1.53.Final"} | |
io.netty/netty-handler-proxy {:mvn/version "4.1.53.Final"} | |
io.netty/netty-handler {:mvn/version "4.1.53.Final"} | |
io.netty/netty-resolver-dns {:mvn/version "4.1.53.Final"} | |
io.netty/netty-resolver {:mvn/version "4.1.53.Final"} | |
io.netty/netty-transport-native-epoll {:mvn/version "4.1.53.Final"} | |
io.netty/netty-transport {:mvn/version "4.1.53.Final"} | |
ch.qos.logback/logback-classic {:mvn/version "1.2.3"} | |
ch.qos.logback/logback-core {:mvn/version "1.2.3"}} | |
:aliases {:run {:main-opts ["-m" "s4-server"] | |
:jvm-opts ["-Ds4.auth.debug=true"] | |
:extra-paths ["."]}}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<configuration> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> | |
</encoder> | |
</appender> | |
<root level="DEBUG"> | |
<appender-ref ref="STDOUT"/> | |
</root> | |
</configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns s4-server | |
(:require [s4.auth :as auth] | |
[s4.core :as s4] | |
[s4.server :refer [make-server!]])) | |
(defn -main | |
[& args] | |
(make-server! {:bind-address "127.0.0.1" | |
:port 8899 | |
:auth-store (auth/->AtomAuthStore (atom {"S4_ACCESS_KEY" "S4_SECRET_ACCESS_KEY"}))})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment