Skip to content

a simple way to start a Spray application that also allows the JVM to exit in case of a binding failure.

License

Notifications You must be signed in to change notification settings

edadma/spray-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spray-app

a simple way to start a Spray application that also allows the JVM to exit in case of a binding failure.

Example

import spray.routing._
import xyz.hyperreal.sprayapp.SprayApp

object SprayAppMain extends SprayApp {

	startServer( interface = "localhost", port = 8080 ) {

		(get & pathSingleSlash) {
			complete {
				<html>
					<head>
						<title>Spray App Test</title>
					</head>
					<body>
						<h1>Spray App Test</h1>
					</body>
				</html>
			}
		}
	}

}

The interface and port parameters default to localhost and 8080, respectively.

Usage

Just include

resolvers += "Hyperreal Repository" at "https://dl.bintray.com/edadma/maven"

libraryDependencies += "xyz.hyperreal" %% "spray-app" % "0.1"

in your build.sbt.

License

MIT license

About

a simple way to start a Spray application that also allows the JVM to exit in case of a binding failure.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages