The project use a Freestyle-Slick integration in a Play framework application, including a form for insert a user data with validation, security filters and response in Json as part of example of how to do an Api Rest.
To run this project you need to have installed:
JDK
: v8SBT
: v0.13.15Scala SDK
: v2.11.11
Once you have it all installed in project root execute in terminal sbt run
and open in a browser localhost:9000
to see it.
Controllers
: Compose by actions that get the request and return a response or redirect to another action.
Dao
: Folder of Slick generated mapping and Fresstyle-Slick integration.
Views
: The twirl templates.
Filters
: Security filters.
Conf
: The application.conf
with the configuration and routes
with the app routes.
Public
: Assets folder.
I'm using ĂŹn this project Slick-CodeGen.
To generate the file Tables.scala
with the mapping you can execute sbt slick-gen
.
To generate the schema you can run Tables.schema.create
first in the main
method.
Note: Set your own user
and password
in application.conf
and build.sbt
.