https://github.com/Niteesh-chowdary/JobBoard-Microservice-Application
-
git clone the repo
-
Install JDK22
-
Install Docker or Docker Desktop to run the docker-compose file to get the postgres server running.
-
cd into the cloned repo
-
Run docker compose up -d (to run docker containers in detach mode)
-
The above step will bring up the postgres server postgres admin services up
-
Open a web-browser navigate to localhost://5050
-
Click add new server
- In General, name = postgres
- Navigate to connection
- Host name/address = postgres
- username = niteesh
- password = 123456789
-
After creating the server. Create a database in the server.
-
databse name = jobBoardApp
-
now cd into src/main/java/com/Niteesh/JobBoard
-
run the command java JobBoardApplication.java
-
It will bring up the job board application
-
Install postman to test the server with various APIS
-
In postman Try the following commands
API request to GET the list of companies in JSON
GET http://localhost:8080/companies
API request to POST a company
POST http://localhost:8080/companies
1. Click Body
2. select raw
3. select json
4. paste the following in json body
{
"name": "Microsoft",
"description":"Software Industry company",
"location":"WA"
}
5. click send
API request to PUT(update) a company
POST http://localhost:8080/companies
1. Click Body
2. select raw
3. select json
4. paste the following in json body
{
"name": "updated-name",
"description":"updated-description",
"location":"updated-location"
}
5. click send
API request to DELETE a company (place a company id in the place of companyId to delete the company from database.
POST http://localhost:8080/companies/{companyId}