Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

First stab at Heroku support

  • Loading branch information...
commit f6fbf8834b0ebc7975020d2e3541f9d500b5f18e 1 parent 391c324
@stephenjudkins authored
View
2  .gitignore
@@ -1,3 +1,5 @@
/project/target
+/project/boot
+/project/project
/target
/.idea
View
1  Procfile
@@ -0,0 +1 @@
+web: target/start Web
View
11 build.sbt
@@ -6,4 +6,13 @@ libraryDependencies += "net.databinder" %% "unfiltered" % "0.5.3"
libraryDependencies += "net.databinder" %% "unfiltered-netty-server" % "0.5.3"
-libraryDependencies += "net.liftweb" %% "lift-json" % "2.4-M4"
+libraryDependencies += "net.liftweb" %% "lift-json" % "2.4-M4"
+
+seq(com.typesafe.startscript.StartScriptPlugin.startScriptForClassesSettings: _*)
+
+name := "poisauce"
+
+version := "0.1"
+
+scalaVersion := "2.9.1"
+
View
1  project/build.properties
@@ -0,0 +1 @@
+sbt.version=0.11.2
View
3  project/build.sbt
@@ -0,0 +1,3 @@
+resolvers += Classpaths.typesafeResolver
+
+addSbtPlugin("com.typesafe.startscript" % "xsbt-start-script-plugin" % "0.5.0")
View
4 src/main/scala/ps/tricerato/Main.scala
@@ -6,6 +6,8 @@ import unfiltered.netty.ReceivedMessage
import unfiltered.request._
import unfiltered.response._
import JavaConversions._
+import util.Properties
+
object Main {
val plan = unfiltered.netty.cycle.Planify {
case req @ POST(Path("/")) => response(req)
@@ -24,7 +26,7 @@ object Main {
def main(args:Array[String]) {
- val port = args.headOption.map(_.toInt).getOrElse(8080)
+ val port = Properties.envOrElse("PORT", "8080").toInt
unfiltered.netty.Http(port).chunked(10000000).plan(plan).run()
}
Please sign in to comment.
Something went wrong with that request. Please try again.