···11-// format: off
22-// DO NOT EDIT! This file is auto-generated.
33-44-// This file enables sbt-bloop to create bloop config files.
55-66-addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.6.0")
77-88-// format: on
···11-// format: off
22-// DO NOT EDIT! This file is auto-generated.
33-44-// This file enables sbt-bloop to create bloop config files.
55-66-addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.6.0")
77-88-// format: on
-8
guestbook/project/project/project/metals.sbt
···11-// format: off
22-// DO NOT EDIT! This file is auto-generated.
33-44-// This file enables sbt-bloop to create bloop config files.
55-66-addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.6.0")
77-88-// format: on
-16
guestbook/src/main/resources/logback.xml
···11-<configuration>
22- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
33- <!-- On Windows machines setting withJansi to true enables ANSI
44- color code interpretation by the Jansi library. This requires
55- org.fusesource.jansi:jansi:1.8 on the class path. Note that
66- Unix-based operating systems such as Linux and Mac OS X
77- support ANSI color codes by default. -->
88- <withJansi>true</withJansi>
99- <encoder>
1010- <pattern>[%thread] %highlight(%-5level) %cyan(%logger{15}) - %msg %n</pattern>
1111- </encoder>
1212- </appender>
1313- <root level="INFO">
1414- <appender-ref ref="STDOUT" />
1515- </root>
1616-</configuration>
···11-package systems.gaze.guestbook
22-33-import cats.effect.IOApp
44-import org.http4s.Uri
55-66-object Main extends IOApp.Simple:
77- val websiteUri =
88- Uri
99- .fromString(sys.env("GUESTBOOK_WEBSITE_URI"))
1010- .getOrElse(throw new Exception("write better uris lol"))
1111- val guestbookConfig = Guestbook.Config(
1212- entriesPath = os.pwd / "entries",
1313- entryCountPath = os.pwd / "entries_size"
1414- )
1515- // make the entries path if it doesnt exist
1616- os.makeDir.all(guestbookConfig.entriesPath)
1717- // make the entry count path if it doesnt exist
1818- if !os.exists(guestbookConfig.entryCountPath) then
1919- os.write(guestbookConfig.entryCountPath, 0.toString)
2020- val run = GuestbookServer.run(guestbookConfig, websiteUri)