init(13): new sbt project, main args
This commit is contained in:
parent
2f1804a9fd
commit
28f2cf281a
|
@ -0,0 +1,15 @@
|
|||
ThisBuild / scalaVersion := "3.2.2"
|
||||
fork := true
|
||||
|
||||
ThisBuild / version := "0.0.1"
|
||||
ThisBuild / organization := "industries.sunshine"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
name := "testimonials-grid-section",
|
||||
libraryDependencies ++= Seq(
|
||||
"com.lihaoyi" %% "cask" % "0.9.1",
|
||||
"com.lihaoyi" %% "mainargs" % "0.5.0",
|
||||
"org.thymeleaf" % "thymeleaf" % "3.1.1.RELEASE"
|
||||
)
|
||||
)
|
|
@ -0,0 +1 @@
|
|||
sbt.version=1.9.0
|
|
@ -0,0 +1,3 @@
|
|||
addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0")
|
||||
|
||||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.1")
|
|
@ -0,0 +1,18 @@
|
|||
package testimonialsgrid
|
||||
|
||||
import mainargs.{main, arg, ParserForMethods}
|
||||
|
||||
object Main {
|
||||
@main def run(
|
||||
@arg(name = "port", short = 'p', doc = "Port on which server will start serving.")
|
||||
portArg: Int = 8080,
|
||||
@arg(name = "host", doc = "Host on which server will start serving.")
|
||||
hostArg: String = "localhost"
|
||||
): Unit = {
|
||||
val a = 1
|
||||
println(s"Will start server on ${hostArg}:${portArg}")
|
||||
}
|
||||
|
||||
def main(args: Array[String]): Unit = ParserForMethods(this).runOrExit(args)
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package example
|
||||
|
||||
class ExampleSuite extends munit.FunSuite:
|
||||
|
||||
test("addition") {
|
||||
assert(1 + 1 == 2)
|
||||
}
|
||||
end ExampleSuite
|
Loading…
Reference in New Issue