Skip to main content
Version: Previous

Custom endpoints - configuring runtime

Gpal custom endpoints require no configuration beyond the web-handler.kts file. No modifications to the processes.xml file are required. Files will be picked up automatically by the Genesis Router from the /script folders.

Script modules

If your custom endpoint requires additional dependencies, then these can use the ScriptModules annotation.

For example, to add a dependency on my-module, add this to the top of your file:

@file:ScriptModules("my-module")

This code tries to find your my-module module and add it to the classpath of the script, including all its dependencies. This has the same effect as adding a <module> tag to the processes.xml file, but it works on a script level.

Configure Genesis Router

If you are going to use custom endpoints, it is essential that you configure the Genesis Router.

Here is an example configuration:

router {
webPort = 9064
socketPort = 9065

// rest of file cut for brevity
}