Skip to content
Snippets Groups Projects
Commit e2e62e86 authored by albrecht's avatar albrecht
Browse files

Added jwt in readme

parent b8f67f9b
No related branches found
No related tags found
No related merge requests found
......@@ -2,19 +2,36 @@
## Getting Started
Start without Docker:
# cd src/myaktion && go run main.go
### Start without Docker:
```
./scripts/start-mariadb.sh
# cd src/gomazon && go run main.go
## Build, Start and Stop service using Docker Compose
```
# docker compose build
# docker compose up
# docker compose down
### Build, Start and Stop service using Docker Compose
```
docker compose build
docker compose up
docker compose down
```
ADD Product
## All API Functions
In this section all API-Functions will be presented with an example call!
### GET JWT-Token
Use the Result-Token for all marked API-Functions!
```
curl --location --request GET 'localhost:8080/createJWT' \
--header 'Content-Type: application/json' \
--data '{
"username": "user",
"isAdmin": true
}'
```
### CREATE PRODUCT (Admin only)
```
curl -H "Content-Type: application/json" -d '{"description":"test","totalrating":4.0,"price":2.38}' localhost:8080/product/new
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment