Main goal of this Example is to show how to test Play Framework in memory using H2 and Slick and keep MySQL as main database.
Also contain one-page application RequireJS + AngularJS with Bootstrap, MySQL and Slick.
This is an Example Scala Play application. Application built on Play Framework (Scala), Slick, Webjars, AngularJS, RequireJS, for test using Specs2 that runs in H2 in-memory database.
As base template for application used Marius Soutier's "Example application for Play+AngularJS+RequireJS".
- Playframework 2, WebJars, RequireJS and AngularJS together;
- In running mode using Slick for work with MySQL;
- For testing application using Specs2 and run all tests in H2 in-memory database;
- For frontend application using Bootstrap with ngTable and for DatePickers Angular UI Bootstrap.
- You do need a JDK 7+ (e.g. http://www.oracle.com/technetwork/java/javase/downloads/index.html);
- Install sbt (http://www.scala-sbt.org/release/docs/Getting-Started/Setup.html);
- Install mysql server.
You can get this example through Activator. For more information please use following url that explains how to get this template on your computer step-by-step: https://typesafe.com/activator/template/play-slick-angular-test-example
- Create mysql database
- Modify config
conf/application.conf
To run application, call command:
$ sbt run
Then you can find application on following url: http://localhost:9000/
To run tests, call command:
$ sbt test
Copyright (C) 2014 Pavlo Voznenko.
Distributed under the MIT License.