Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bibekaryal86/pets-database
SpringBoot Rest API with MongoDb for CRUD functions
https://github.com/bibekaryal86/pets-database
gradle java mongodb mongotemplate spring spring-security springboot swagger swagger2
Last synced: 1 day ago
JSON representation
SpringBoot Rest API with MongoDb for CRUD functions
- Host: GitHub
- URL: https://github.com/bibekaryal86/pets-database
- Owner: bibekaryal86
- Created: 2021-12-11T23:59:12.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T02:47:27.000Z (4 months ago)
- Last Synced: 2024-10-24T16:19:06.868Z (3 months ago)
- Topics: gradle, java, mongodb, mongotemplate, spring, spring-security, springboot, swagger, swagger2
- Language: Java
- Homepage: https://pets-database.appspot.com/pets-database/tests/ping
- Size: 274 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pets-database
This REST API is implemented to execute CRUD functions in MongoDB. There are no business logic in this service, it is
limited to model and CRUD functions only.To run the app, we need to supply the following environment variables:
* Active Profile
* SPRING_PROFILES_ACTIVE (development, docker, production)
* Application security details:
* BASIC_AUTH_USR (username to enforce spring security)
* BASIC_AUTH_PWD (password to enforce spring security)
* MongoDB Database Details:
* MONGODB_ACC_NAME (mongodb collection name)
* MONGODB_USR_NAME (mongodb username)
* MONGODB_USR_PASSWORD (mongodb password)
* The final run command looks like this:
* java -jar -DSPRING_PROFILES_ACTIVE=development -DBASIC_AUTH_USR=some_username -DBASIC_AUTH_PWD=some_password
-DMONGODB_ACC_NAME=account_name -DMONGODB_USR_NAME=another_username -DMONGODB_USR_PWD=another_password JARFILE.jarThis app is one of the five apps that form the PETS (Personal Expenses Tracking System) application:
* https://github.com/bibekaryal86/pets-database (this)
* https://github.com/bibekaryal86/pets-service
* https://github.com/bibekaryal86/pets-authenticate
* https://github.com/bibekaryal86/pets-gateway
* https://github.com/bibekaryal86/pets-spaThis app is deployed in Google Cloud Project. The GCP configurations are found in the `gcp` folder in the project root.
To deploy to GCP, we need to copy the jar file to that folder and use gcloud app deploy terminal command.* App Test Link: https://pets-database.appspot.com/pets-database/tests/ping