Skip to content

Commit 8ed61c5

Browse files
updating readme
1 parent d83a084 commit 8ed61c5

File tree

1 file changed

+31
-24
lines changed

1 file changed

+31
-24
lines changed

README.md

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
[![sonar](https://sonarcloud.io/api/project_badges/measure?project=GouravRusiya30_SpringBootRestAPI&metric=alert_status)](https://sonarcloud.io/dashboard?id=GouravRusiya30_SpringBootRestAPI)
44
[![codecov](https://codecov.io/gh/GouravRusiya30/SpringBootRestAPI/branch/master/graph/badge.svg)](https://codecov.io/gh/GouravRusiya30/SpringBootRestAPI)
55

6+
## Desciption
7+
Simple rest api using spring boot and mongodb as nosql storage.
8+
This project mainly focussed on the kickstart to the CI/CD using TravisCI. Also includes CodeCoverage, Sonarqube integration with can be plugged into any application.
9+
610
## Task List Progress
711
- [X] Rest controllers and models using SpringBoot
812
- [X] MongoDB configuration
@@ -13,30 +17,21 @@
1317
- [ ] 80% and above Code Coverage
1418
- [ ] Cloud deployment
1519

20+
### Getting Started
21+
* Import this project into your favourite IDE after fork and checkout of this repository.
1622

17-
```Tech Stack Used in this project ```
18-
* Java
19-
* Spring Boot
20-
* Gradle
21-
* MongoDB
22-
23-
## ```Setup Steps ```
23+
### Pre-requisite and Installing Steps
2424

25-
### Step 1: Creating a Database
26-
Get a running instance of MongoDB that you can connect to.
25+
* Get a running instance of MongoDB that you can connect to.
2726
For more information on getting started with MongoDB, visit their [online tutorial](https://docs.mongodb.com/manual/).
28-
29-
Start by creating a test database. I will call mine "rest_tutorial" using the following command in the MongoDB shell, or through a database manager like MongoDB Compass:
27+
* Start by creating a test database. I will call mine "rest_tutorial" using the following command in the MongoDB shell, or through a database manager like MongoDB Compass:
3028
```use rest_tutorial;```
31-
This will create a new database in MongoDB that we can use for our project.
32-
33-
### Step 2: Adding a MongoDB Collection and Data
34-
Create a sample collection that will hold data about different types of pets. Let's create the collection with the following command:
3529

30+
* Create a sample collection that will hold data about different types of pets. Let's create the collection with the following command:
3631
```db.createCollection("pets");```
37-
Once the collection is created, we need to add some data!
38-
We can add data to the collection with the following command:
3932

33+
* Once the collection is created, we need to add some data!
34+
We can add data to the collection with the below query, you can add any number of data like this :
4035
```db.pets.insertMany([```
4136
```{```
4237
```"name" : "Spot",```
@@ -55,13 +50,25 @@ We can add data to the collection with the following command:
5550
```}```
5651
```]);```
5752

58-
### Step 3: Adding mongodb credentials
59-
Add the mongodb authentication-database, username & password in [application.properties](https://github.com/GouravRusiya30/SpringBootRestAPI/blob/master/src/main/resources/application.properties)
53+
* Add the mongodb authentication-database, username & password in [application.properties](https://github.com/GouravRusiya30/SpringBootRestAPI/blob/master/src/main/resources/application.properties)
6054
If there is no authrntication when you are running locally then you can also remove these properties from this file.
6155

62-
### Step 4: Testing Your API
56+
57+
### Running the tests
6358
Once the server starts, you are free to test your API however you choose.
64-
For example :
65-
* POST 'http://localhost:8080/pets'
66-
With body : ```{"name" : "Liam", "species" : "cat", "breed" : "tabby"}```
67-
and header : ```'Content-Type: application/json'```
59+
Use postman for the below tests :
60+
##### [getAllPets](https://github.com/GouravRusiya30/SpringBootRestAPI/blob/master/docs/getAllPets.png)
61+
62+
##### [getPetById](https://github.com/GouravRusiya30/SpringBootRestAPI/blob/master/docs/getPetById.png)
63+
64+
##### [createPet](https://github.com/GouravRusiya30/SpringBootRestAPI/blob/master/docs/createPet.png)
65+
66+
##### [deletePet](https://github.com/GouravRusiya30/SpringBootRestAPI/blob/master/docs/deletePet.png)
67+
68+
##### [modifyPetById](https://github.com/GouravRusiya30/SpringBootRestAPI/blob/master/docs/modifyPetById.png)
69+
70+
### Contributing
71+
Please read [CONTRIBUTING.md](https://github.com/GouravRusiya30/SpringBootRestAPI/blob/master/docs/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
72+
73+
### Authors
74+
* **Gourav Rusiya**

0 commit comments

Comments
 (0)