Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rishmi5h/blogging-platform-api
https://github.com/rishmi5h/blogging-platform-api
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rishmi5h/blogging-platform-api
- Owner: rishmi5h
- Created: 2024-08-17T19:20:27.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-21T21:01:28.000Z (5 months ago)
- Last Synced: 2024-08-22T22:34:10.056Z (5 months ago)
- Language: Java
- Size: 344 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# blogging-platform-api
cc: [source-challenge](https://roadmap.sh/projects/blogging-platform-api)
## RequirementsFor building and running the application you need:
- [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- [Maven 3](https://maven.apache.org)
- [Docker](https://docs.docker.com/engine/installation/)
- [Docker-compose](https://docs.docker.com/compose/install/)## Running the application locally
First run the docker container
```
docker compose up -d
```There are several ways to run a Spring Boot application on your local machine. One way is to execute the `main` method in the `BloggingPlatformApiApplication` class from your IDE.
Alternatively you can use the [Spring Boot Maven plugin](https://docs.spring.io/spring-boot/docs/current/reference/html/build-tool-plugins-maven-plugin.html) like so:
```shell
mvn spring-boot:run
```## API Description
### Swagger UI - [http://localhost:8080/swagger-ui.html](http://localhost:8080/swagger-ui.html)### API Documentation - [http://localhost:8080/api-docs](http://localhost:8080/api-docs)
![img_4.png](images/img_4.png)
### GET /posts/{id} - returns a single post by id
![img.png](images/img.png)### GET /posts - returns a list of posts
![img_1.png](images/img_1.png)### POST /posts - creates a new post
![img_3.png](images/img_3.png)### PUT /posts/{id} - updates a post
![img_2.png](images/img_2.png)### DELETE /posts/{id} - deletes a post
![img_5.png](images/img_5.png)## Copyright
Released under the Apache License 2.0. See the [LICENSE](https://github.com/codecentric/springboot-sample-app/blob/master/LICENSE) file.