crud4playplugin

this plugin can be used to generate the boiler plate code to access a database and provide a rest api for it that offers create read update delete. I use Slick for the database access.

from the demo blog project for example

GET /tables/blog ( with optional query params sortBy and direction)

GET /tables/blog// (this queries database where = . You can also use optional query params sortBy and direction)

GET /tables/blog/

POST /tables/blog

PUT /tables/blog

DELETE /tables/blog/:blog_id

Note if GET / queries a timestamp it should be passes a long value not text representation

slick,controller and routes generated from single configuration file.

You have to create the database as well as configure it in application.conf

There are sample test projects under directory

https://github.com/bernardjason/crud4playplugin/tree/master/src/sbt-test/crudplugin

while a fuller project
https://github.com/bernardjason/tracking

which is deployed on Heroku here
https://bjason-tracking.herokuapp.com/#