Simple application that works as mediator of external API calls NewsAPI with obviously beautiful front-end 👌.
GET: /news/{country}/{category}
- shows top-headlines articles.
GET: /news?query=programming
- you can search for articles e.g. programming.
-
enable annotation processing
in your IDE
- min. JDK-8, Docker, npm
./gradlew bootRun
- to run application
./gradlew test
- to run tests
./gradlew clean build test
- all in one command
Generated documentation can be found here http://localhost:8080/api/swagger-ui.html
Frontend is generated with vue-cli.
npm install
- project setup
npm run serve
- compiles and hot-reloads for development
npm run build
- compiles and minifies for production
npm run lint
- lints and fixes files
Frontend can be found here: http://localhost:8081/
Run both front + back:
cd news-service && ./gradlew clean build docker
docker-compose build
docker-compose up
Frontend here:http://localhost:8081/
Backend here:http://localhost:8080/...
Backend documentation here:http://localhost:8080/api/swagger-ui.html
cd news-service
./gradlew clean build docker
docker build -f Dockerfile -t docker-news-service .
docker run -p 8080:8080 docker-news-service
cd news-frontend
docker build -t vuejs-cookbook/dockerize-vuejs-app .
docker run -it -p 8080:80 --rm --name dockerize-vuejs-app-1 vuejs-cookbook/dockerize-vuejs-app
Commands description
To show running containers run command docker ps
.
To show your local docker images run command docker images
.