This repository contains source code which is used to build a REST API with Spring Boot for the expense tracker application
Technologies Used - Spring Boot, Mongo DB.
API has been documented using Swagger and Springfox, can be checked in below URLs http://localhost:8090/swagger-ui/ http://localhost:8090/v2/api-docs
Postman can be used to test the API which includes the HTTP operations (GET, DELETE, POST, PUT) URL's can be found in the above swagger documentation link.
For the uninitiated, Mongodb is running in port 27017 under the database "expense-tracker" and collection "expense". Below are the commands that have to be used to verify the data present in Mongo collection.
- sudo mongod -- run in a terminal or command prompt
- Mongo -- run in a separate terminal
- show databases -- list all databases available
- use expense-tracker -- use our schema
- show collections -- list all collections
- show tables -- list all the tables
- db.getCollectionNames() -- show expense as collection
- db.expense.find() -- show all the entries inserted via Postman