Very simple blog, developed as a sample exercise. Grails/scaffolding, GSP, GORM and filtering are all applied. A test suite is included to validate the sanity of the code
- JDK 1.8 or later.
- Grails 3.2.x (grails wrapper included)
- Gradle 3.5.x (gradle wrapper included)
- Postgres 1.9 database server with a
blog-development
database available on development andblog
for production (seeapplication.yml
for details and be wary not to reveal your prod credentials on a public repo)
I recommend using jabba to install JDKs and sdkman to install grails and gradle.
git clone
this repositorycd
into repo- do
./gradlew
to fetch dependencies - do
grails run-app
orgrails package
to get a tasty little war to deploy onto your application server - hit
http://localhost:8080
on development or your prod server - all resources may be also fetched as json or xml, for example:
curl http://localhost:8080/post.json
- do
grails test-app
to run the test suite
root
route is redirected directly to post index- Post has many Tags (Join Table
Post_Tags
) - Tags are fixed (see
bootstrap.groovy
to customize the list)
If running correctly, you should see an application like this:
- Ajax post deletion from index view
- Add attachments
- Add comments
- Add editor credentials and a user model with role
- Add a way to add and police user privileges by role so only admins can edit the Tags
- Make editor HTML5-rich
- Lots more unit tests (only domains are tested now)
- Integration tests
@nullset2 (2017)