updated documentation

This commit is contained in:
2016-03-09 09:45:55 +01:00
parent 4ebccaa2dc
commit c3812d05dc
2 changed files with 71 additions and 2 deletions
Binary file not shown.
+71 -2
View File
@@ -1,5 +1,74 @@
Bayer Ubiquitous Rating Platform - example application
======================================================
This is the Bayer Ubiquitous Rating Platform (BURP), where users can share short This is the Bayer Ubiquitous Rating Platform (BURP), where users can share short
ratings of the different canteen dishes with co-workers. ratings of the different canteen dishes with co-workers.
This project illustrates the basic structure of a RESTful backend in conjunction The application is a simple twitter clone that illustrates the basic structure
with a single page application based on Spring Boot, AngularJS and Bootstrap. of a RESTful backend in conjunction with a single page application based on
Spring Boot, AngularJS and Bootstrap.
Once started, the application is running at http://localhost:8081/ (configured
via /src/main/resources/application.properties)
The database initialization is done with /src/main/resources/data-h2.sql
Login
-----
User: Adam
Password: test
CRUD Operations
---------------
GET
curl -i http://localhost:8081/
curl -i http://localhost:8081/users
curl -i http://localhost:8081/burps
curl -i http://localhost:8081/burps/1
curl -i http://localhost:8081/burps/1/tags
POST
curl -i -X POST -H "Content-Type:application/json" -d '{"text":"I actually liked the dish on the #right","timestamp":"2015-11-18T16:48:11.21+0000","user":"http://localhost:8081/users/2","tags":["http://localhost:8080/tags/2"]}' http://localhost:8080/burps
Please note, that you need to escape quotation marks when using curl on Windows:
[Windows] curl -i -X POST -H "Content-Type:application/json" -d "{\"text\":\"I actually liked the dish on the #right\",\"timestamp\":\"2015-11-18T16:48:11.21+0000\",\"user\":\"http://localhost:8080/users/2\",\"tags\":[\"http://localhost:8080/tags/2\"]}" http://localhost:8080/burps
PUT/PATCH
curl -i -X PUT -H "Content-Type:application/json" -d '{"text":"I actually liked the dish on the #left","timestamp":"2015-11-18T16:48:11.21+0000","user":"http://localhost:8081/users/2","tags":["http://localhost:8080/tags/1"]}' http://localhost:8080/burps/7
DELETE
curl -i -X DELETE http://localhost:8081/burps/7
curl -i http://localhost:8081/burps/7
Steps
-----
You can follow the steps of creating the application by comparing the commits
against each other.
* BURP pt. 1 - REST API
* BURP pt. 2 - Security
* BURP pt. 3a - AngularJS basic code
(only for comparison, the following commit is needed to run the project)
* BURP pt. 3b - AngularJS resources
* BURP pt. 4 - AngularJS POST and @RepositoryEventHandler
* BURP pt. 5a - Bootstrap code
(only for comparison, the following commit is needed to run the project)
* BURP pt. 5b - Bootstrap resources