Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

try to use env vars for the port and public directory

  • Loading branch information...
commit c029b9cc50a4338b934fda7d421d48641029f81b 1 parent 058d0aa
@casualjim casualjim authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/g8/src/main/scala/$package$/JettyMain.scala
View
4 src/main/g8/src/main/scala/$package$/JettyMain.scala
@@ -17,11 +17,11 @@ object JettyMain {
server setStopAtShutdown true
val connector = new SelectChannelConnector
- connector setPort 8080
+ connector setPort sys.env.get("PORT").map(_.toInt).getOrElse(8080)
connector setMaxIdleTime 90000
server addConnector connector
- val webapp = "src/main/webapp"
+ val webapp = sys.env.get("PUBLIC") getOrElse "src/main/webapp"
val webApp = new WebAppContext
webApp setContextPath "/"
webApp setResourceBase webapp
Please sign in to comment.
Something went wrong with that request. Please try again.