Change the ip the server is bind to.

27 views
Skip to first unread message

Jean-Bernard Brissaud

unread,
Nov 12, 2017, 10:20:50 AM11/12/17
to scalatra-user
The ip server in the example scalatra project is 0.0.0.0 (all ips). How to set it to (for instance) 192.168.1.1 ?
I have succesfully change the port (adding "containerPort in Jetty := 8000" at the end of the sbt file).
But I can't find out how to change the ip the server is listening to.

Jean-Bernard Brissaud

unread,
Nov 13, 2017, 7:34:25 AM11/13/17
to scalatra-user
Just to clarify...
I have tried the following:
add: context.initParameters("org.scalatra.HostName") = "10.1.1.2" in ScalatraBootstrap.scala
but it has no effect..
I'm using sbt v13.03, scala v.12, and intellij idea (last update).
The example used is HTTPExample from the scalatra site.
And I am really surprised that such a current setup is so difficult with Scalatra. Or do I miss something?
Reply all
Reply to author
Forward
0 new messages