Add explicit path to repository in viewer

This commit is contained in:
Alexander Nozik 2023-01-24 15:27:14 +03:00
parent 17d681bd42
commit 64bae18644

View File

@ -35,7 +35,7 @@ public fun main() {
embeddedServer(CIO, port, host, module = Application::numassModule).start()
}
public fun Application.numassModule() {
public fun Application.numassModule(repositoryName: String = "D:\\Work\\Numass\\data\\test") {
val context = Context("Numass") {
plugin(NumassProtoPlugin)
plugin(NumassCommonPlugin)
@ -45,10 +45,7 @@ public fun Application.numassModule() {
val numassCommon = context.fetch(NumassCommonPlugin)
val visionManager = numassCommon.visionManager
val repositroyName = "D:\\Work\\Numass\\data\\test"
val repository: DataTree<NumassDirectorySet> = runBlocking { numassProto.readRepository(repositroyName) }
val repository: DataTree<NumassDirectorySet> = runBlocking { numassProto.readRepository(repositoryName) }
routing {
resources()