From 36b55c1329d2348930d8427512891fd700c2d54a Mon Sep 17 00:00:00 2001
From: Anthony Cicchetti <me@anthonycicchetti.com>
Date: Thu, 29 Aug 2019 20:17:10 -0400
Subject: [PATCH] Miscellaneous fixes for webjars not resolving

---
 justfile                                              | 3 +--
 src/main/kotlin/com/anthonycicchetti/slackbot/Main.kt | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/justfile b/justfile
index 470bba3..5db395e 100644
--- a/justfile
+++ b/justfile
@@ -1,8 +1,7 @@
 version := `cat VERSION`
 
 push: build
-    scp ./build/libs/slackmemes-{{version}}-all.jar anthonycicchetti.com:/home/slackbot/slackbot.jar
-    ssh anthonycicchetti.com "service slackbot restart"
+    scp ./build/libs/slackmemes-{{version}}-all.jar anthonycicchetti.com:/home/acicchetti/slackbot.jar
 
 build:
     ./gradlew shadowJar
diff --git a/src/main/kotlin/com/anthonycicchetti/slackbot/Main.kt b/src/main/kotlin/com/anthonycicchetti/slackbot/Main.kt
index 0ac1c46..cca3773 100644
--- a/src/main/kotlin/com/anthonycicchetti/slackbot/Main.kt
+++ b/src/main/kotlin/com/anthonycicchetti/slackbot/Main.kt
@@ -21,6 +21,7 @@ fun main() {
 
     val app = Javalin.create { config ->
         config.registerPlugin(OpenApiPlugin(createOpenApiOptions()))
+        config.enableWebjars()
         config.enableCorsForAllOrigins()
         config.requestLogger {ctx, ms ->
         logger.info("Took ${ms.roundToInt()} to process ${ctx.req.requestURL}")
@@ -116,7 +117,6 @@ private fun createOpenApiOptions(): OpenApiOptions {
         OpenAPI()
             .info(Info().version("0.1.2").description("Slackbot Open API documentation"))
             .addServersItem(Server().url("https://acicchetti.dev/"))
-            .addServersItem(Server().url("http://localhost:7000/"))
     }
 
     return OpenApiOptions(o)