A derivative of Scalatra sbt project this repo is intended to get a scalatra/scalaquery based web app setup quickly.
$ brew install giter8
- Get the g8 template and run it:
$ g8 AdamFerguson/scalatra-scalaquery
$ cd <name-of-app>
$ ./sbt
> container:start
- Open the default website in your browser.
This template includes plugins that generate all the necessary files for working with
either eclipse or intellij, depending on your preference. After generating the application,
execute either sbt eclipse
or sbt idea
(or both!) from the project to directory to generate your IDE's
dependencies. Note, anytime a dependency is added to the build.sbt file, these commands will need
to be run again.
Note: I recommend checking out JRebel for auto code redploys. is an IDE plugin that eases auto-deploy on code changes. They offer free one year licenses for Scala developers. It's definitely worth a look.
This template is setup to work with postgres. The template will prompt you for the database name. This database will still need to be created locally. Make sure to run:
createdb DATABASE_NAME
From there, ScalaQuery can be used for creating the DB schema using ScalaQuery's DDL API
- Install sbt, version 0.12.0 or higher.
- Fork scalatra/scalatra-sbt.g8 on GitHub to your account. Let's assume your account is "foo".
- Clone it.
$ git clone [email protected]:foo/scalatra-slick.g8.git
- Now make your desired changes.
- Do a local deploy of your modified template and try it out.
$ sbt
> g8-test # must result in SUCCESS
> exit
$ cd target/sbt-test/default-*/scripted
$ sbt
$ container:start
- If you like your new template, push it to GitHub.
$ cd /path/to/scalatra-slick.g8.git
$ git push
- You can now access your modified template using g8.
$ cd
$ g8 foo/scalatra-slick.g8
- If you'd like to share your changes, send a pull request.