MySQL required
CREATE DATABASE simpleCMS;
CREATE USER 'simpleCMS'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON simpleCMS . * TO 'simpleCMS'@'localhost';
FLUSH PRIVILEGES;
node >= 6.0.0 required!
npm >= 3.0.0 required!
cd frontend
npm install
npm run build
cp -R dist/* ../backend/src/main/resources/public/
Maven and JAVA 8 required!
cd backend
mvn package
java -jar backend/target/simpleCMS-0.0.1-SNAPSHOT.jar
live at
localhost:8080
Port and base url localhost:8080/api
/articles
or /comments
Returns one page and links to next and previous page
- page
?page=0
-
- page number, first query returns page 0
- size
?size=20
-
- number of articles/comments per page. default size 20
- sort
?sort=id,desc
-
- sort only id asc/desc implemented.
/articles/{id}
Returns one article
/articles/{id}/comments
Returns all comments of article
/comments/{id}
Returns one comments
/comments/{id}/article
Returns article of comment
/articles
or /comments
Push new article or comment, body payload in json.
body for article
{
"header":"string",
"preview":"string",
"body":"string",
"author":"string"
}
body for comment
{
"article":"{article id as url eq. /1}",
"body":"string",
"author":"string"
}
/articles/{id}
Edit article
element (header, preview or body) and new value as json {"body":"string"}
/comments/{id}
Edit comment
body and new value as json. {"body":"string"}
same as patch, but PUT method replaces entire entity, so all elements are required or they will be null
/articles/{id}
Edit article
/comments/{id}
Edit comment
body same as in POST method
/articles
Delete all articles. NOT WORKING for atm.
/comments
Delete all articles. NOT WORKING for atm.
/articles/{id}
Delete one article
/comments/{id}
Delete one comments