.Net Core, Ocelot
Devops : Docker
Database : Postgresql, MongoDB
Aşağıdaki araçlara ihtiyacınız olacak:
-
Projeyi klonlayın
git clone https://github.com/emreincekara/rea-taskapp.git
-
Proje dizinine gidin
cd rea-taskapp
-
docker-compose.yml
dosyasını içeren dizinde aşağıdaki komutu çalıştırın:docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d
-
Docker'ın tüm microservice'leri oluşturmasını bekleyin.
-
Microservice'leri aşağıdaki linkler ile çalıştırabilirsiniz:
- Catalog API - http://host.docker.internal:8000/swagger/index.html
- Customer API - http://host.docker.internal:8001/swagger/index.html
- Order API - http://host.docker.internal:8002/swagger/index.html
- API Gateway - http://host.docker.internal:8010/catalog
- pgAdmin PostgreSQL - http://host.docker.internal:5050 - admin@domain.com : admin1234
GET /catalog
{
"id": "string",
"name": "string",
"imageUrl": "string",
"price": 0,
"categoryId": "string",
"category": {
"id": "string",
"name": "string",
"products": [
"string"
]
}
}
GET|DELETE /catalog/${id}
Parametre | Tip | Açıklama |
---|---|---|
id |
uuid |
Gerekli. |
{
"name": "iPhone 11 128 GB",
"imageUrl": "",
"price": 12199.01,
"categoryId": "584bd799-19e1-49c6-b61e-b3718d61d84e",
"category": {
"name": "Telefon",
"products": [],
"id": "584bd799-19e1-49c6-b61e-b3718d61d84e"
},
"id": "82d9a1cb-8db1-46ec-b940-21767ce8a05f"
}
POST|PUT /catalog
{
"name": "iPhone 11 128 GB",
"imageUrl": "",
"price": 12199.01,
"categoryId": "584bd799-19e1-49c6-b61e-b3718d61d84e"
}
GET /catalog/getProductByName/${name}
Parametre | Tip | Açıklama |
---|---|---|
name |
string |
Gerekli. Ürün adı. |
GET /catalog/getProductByCategory/${categoryName}
Parametre | Tip | Açıklama |
---|---|---|
categoryName |
string |
Gerekli. Kategori adı. |
GET /customer
{
"id": "uuid",
"name": "string",
"email": "user@example.com",
"createdAt": "timestamp",
"updatedAt": "timestamp",
"address": {
"id": "uuid",
"customerId": "uuid",
"addressLine": "string",
"city": "string",
"country": "string",
"cityCode": 0
}
}
GET|DELETE /customer/${id}
Parametre | Tip | Açıklama |
---|---|---|
id |
uuid |
Gerekli. |
POST|PUT /customer
{
"id": "uuid",
"name": "string",
"email": "user@example.com",
"createdAt": "timestamp",
"updatedAt": "timestamp",
"address": {
"id": "uuid",
"customerId": "uuid",
"addressLine": "string",
"city": "string",
"country": "string",
"cityCode": 0
}
}
GET /customer/validate/${id}
Parametre | Tip | Açıklama |
---|---|---|
id |
uuid |
Gerekli. |
Boolean: true | false
GET /order
{
"id": "uuid",
"customerId": "uuid",
"quantity": 0,
"price": 0,
"status": "string",
"addressId": "uuid",
"productId": "uuid",
"createdAt": "timestamp",
"updatedAt": "timestamp"
}
GET|DELETE /order/${id}
Parametre | Tip | Açıklama |
---|---|---|
id |
uuid |
Gerekli. |
POST|PUT /order
{
"id": "uuid",
"customerId": "uuid",
"quantity": 0,
"price": 0,
"status": "string",
"addressId": "uuid",
"productId": "uuid",
"createdAt": "timestamp",
"updatedAt": "timestamp"
}
GET /order/getOrdersByCustomerId/${customerId}
Parametre | Tip | Açıklama |
---|---|---|
customerId |
uuid |
Gerekli. |
GET /order/${id}/${status}
Parametre | Tip | Açıklama |
---|---|---|
id |
uuid |
Gerekli. |
status |
string |
Gerekli. |