Created
August 22, 2013 17:48
-
-
Save LeifWarner/6310506 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example | |
import org.eclipse.jetty.server.Server | |
import org.eclipse.jetty.webapp.WebAppContext | |
import org.scalatra.servlet.MultipartConfig | |
object Main { | |
def main(args: Array[String]) { | |
val port = 8080 | |
val server = new Server(port) | |
val context = new WebAppContext() | |
context.setContextPath("/") | |
context.setResourceBase("src/main/webapp") | |
val holder = context.addServlet(classOf[Facebook], "/*") | |
holder.getRegistration.setMultipartConfig(MultipartConfig( | |
maxFileSize = Some(5*1024*1024), | |
fileSizeThreshold = Some(1*1024*1024) | |
).toMultipartConfigElement) | |
server.setHandler(context) | |
server.start | |
server.join | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment