Giter8 template for Lift 2.4, Scala 2.9, blank, html5-ready
- Install Java SDK or OpenJDK.
- Install Scala, giter8, sbt. sbt-extras is optional but recommended. Or install the all-in-one Typesafe Stack. *
- Install Lift and this template using giter8, run it with sbt:
cd ~/bin (or wherever you want giter8 to create your Lift project directory) g8 liftstack/lift24-s29-blank (or see [list of available Lift project templates]) cd lift24-s29-blank (or whatever project name you choose from previous step) sbt container:start "~ compile"
Lift will be running on localhost:8080. You can begin developing your project and SBT will automatically recompile it on the fly as you create and save changes to files (what "~ compile" does). Try it out by building a multiuser chap app in about 20 lines of code.
giter8 (g8) downloads this Lift project template from github. The sbt commandline:
- sbt = starts sbt interactive mode.
- container:start = starts the Java Servlet container specified in the Lift build.sbt file, Jetty in this case.
- "~ compile" = directs sbt to automatically recompile when changes to .scala source files occur; (multi-word sbt params must be in quotes when directly following 'sbt', but not when run from sbt interactive prompt)
To use Lifty, split up the sbt command above and insert the Lifty directive as such:
cd ~/bin (or wherever you want giter8 to create your Lift project directory) g8 liftstack/lift24-s29-blank (or see [list of available Lift project templates]) cd lift24-s29-blank (or whatever project name you choose from previous step) sbt lifty learn lift https://raw.github.com/Lifty/lifty/master/lifty-recipe/lifty.json container:start ~ compile
* *Multiple install options. For **nix users, if you choose to install Typesafe Stack via the Typesafe repo for your distro, a required dependency is OpenJDK. If you already have Oracle Java installed and don't want to add OpenJDK to your system via package manager required dependency, your best bet is to use the last option on the download page - the Unversal Installer (just a zipped archive you put anywhere and add the bin directory to your PATH).
- Java 6+ or OpenJDK installed
- Scala 2.9 installed *
- sbt 0.11+ installed *
- sbt launcher script installed and on your PATH *
- giter8 installed and on your PATH *
* #2-#5 can be easily done by installing the Typesafe Stack
- lifty sbt plugin to ~/.sbt/plugins
- this lift project template in the current directory