Sign inSign up

denisduev/covid-19

By denisduev

Updated about 6 years ago

University project about SOA

Image
0

294

denisduev/covid-19 repository overview

Covid19 News

Covid19 news in a university project that creates a web application which provides news for Covid19.

Setup

Prerequisites
  1. Java 8 installed
  2. Maven installed
Run
  1. Clone the repository
  2. run mvn spring-boot:run
  3. Call localhost:8081/news → you will see welcome screen

keep in mind that the application's DB saved in test.db (in this repository), if you want to use in memory DB change the value of spring.datasource.url in application.properties to jdbc:h2:mem:testdb)

Operations

Endpoints

You can see all available endpoint by going to localhost:8081/swagger-ui.html The main endpoint is localhost:8081/news

asd

You can start the application on different port than 8081, just add -Dserver.port=<port> when you run with maven

How to fill db

you can execute curl queries to add new entities, for example:

curl -X POST "http://localhost:8081/news" -H "accept: */*" -H "Content-Type: application/json" -d "{ \"author\": \"test\", \"keywords\": [ \"asd\" ], \"paragraphs\": [ \"test\" ], \"title\": \"test\"}"

Used technologies
  • Spring Boot 2.1.1.RELEASE
  • H2 database
Build Docker file

docker build . --tag covid19:latest
and the start is by:
docker run -d -p 8081:8081 covid19:latest access the app on http://localhost:8081

Tag summary

Content type

Image

Digest

Size

105.1 MB

Last updated

about 6 years ago

docker pull denisduev/covid-19