braintelligencePL / news-app

java, springBoot, vueJS, docker, docker-compose - simple client

Home Page:http://www.braintelligence.pl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

News Application

Simple application that works as mediator of external API calls NewsAPI with obviously beautiful front-end 👌.

Endpoints:

GET: /news/{country}/{category} - shows top-headlines articles.
GET: /news?query=programming - you can search for articles e.g. programming.

Pre-setup for IDE (IntellJ Idea)

  • enable annotation processing in your IDE

Prerequisites

  • min. JDK-8, Docker, npm

Working with backend (non-docker)

./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


Working with frontend (non-docker)

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 applications with Docker:

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

Additionally

Backend

  • cd news-service
  • ./gradlew clean build docker
  • docker build -f Dockerfile -t docker-news-service .
  • docker run -p 8080:8080 docker-news-service

Frontend

  • 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.

About

java, springBoot, vueJS, docker, docker-compose - simple client

http://www.braintelligence.pl


Languages

Language:Java 61.6%Language:Groovy 24.6%Language:Vue 9.1%Language:JavaScript 2.3%Language:HTML 1.3%Language:Dockerfile 1.0%