I am building an application using the Scalatra framework, and need to expose one external facing endpoint which I would like to mount on a different port. I am having trouble seeing how to configure my application to do so
class ScalatraBootstrap extends LifeCycle {
override def init(context: ServletContext): Unit = {
// I would like to mount these on two different ports
context mount (new InternalApi, "/api", "api")
context mount (new ExternalApi, "/")
}
override def destroy(context: ServletContext): Unit = {
}
}
Is there a way to do this, or do I need to run multiple Jetty servers inside my application? Any help in pointing me in the right direction would be greatly appreciated!