Created
January 17, 2011 21:45
-
-
Save wfaler/783541 to your computer and use it in GitHub Desktop.
Bootstrap.scala
This file contains hidden or 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 bowlerquickstart | |
import org.bowlerframework.view.scalate._ | |
/** | |
* This class acts as the starting point and bootstrap point for our application | |
*/ | |
class Bootstrap{ | |
// parent layout | |
val parentLayout = DefaultLayout("default") | |
def resolver(request: Request): Option[Layout] = Option(parentLayout) | |
TemplateRegistry.defaultLayout = resolver(_) | |
// I think we're ready to start and instantiate our Controller. | |
val controller = new MyController | |
// allow template reload during development - remove these lines in production for better performance | |
org.bowlerframework.view.scalate.RenderEngine.getEngine.allowCaching = false | |
org.bowlerframework.view.scalate.RenderEngine.getEngine.allowReload = true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment