Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/umutalacam/readingisgood
Example implementation of spring boot with mongo db
https://github.com/umutalacam/readingisgood
Last synced: about 2 months ago
JSON representation
Example implementation of spring boot with mongo db
- Host: GitHub
- URL: https://github.com/umutalacam/readingisgood
- Owner: umutalacam
- Created: 2021-12-13T10:22:28.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-13T17:08:38.000Z (about 3 years ago)
- Last Synced: 2023-07-26T22:36:44.704Z (over 1 year ago)
- Language: Java
- Size: 29 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reading is Good
This is an example implementation of a RestAPI that uses mongo db as persistent storage.
### Running the application (Docker)
For running the reading is good application using Docker, you need to run fallowing command in the root directory of the project.
`docker compose up`
The project requires a mongo db instance, therefore the docker compose file will create a container with mongodb image.
When the application is started, you can reach the endpoints through port 8080.
### API Security
The API uses jwt token for authentication. In each request, the token needs to be given in Authorization header.
#### Obtaining a JWT Token
For obtaining a JWT token, `/authenticate` endpoint is used. The docker image initializes some users automatically, you can use their credentials to obtain a JWT token. For example, you can use the credentials given below.
Credentials for alice user:
```json
{
"username": "alice",
"password": "123456"
}
```### Endpoints
Endpoint definitions can be found at postman documentation. (https://documenter.getpostman.com/view/14145413/UVR5rUzQ)
It is also useful to check OpenAI enpoint by calling `/v2/apidocs` endpoint.