init(12): new sbt project: static price component
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package example
|
||||
|
||||
import mainargs.{main, arg, ParserForMethods}
|
||||
|
||||
object Main {
|
||||
@main def run(
|
||||
@arg(
|
||||
name = "post",
|
||||
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 =
|
||||
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
|
||||
Reference in New Issue
Block a user