add remote host 5.35.86.48
This commit is contained in:
parent
b53aecd26d
commit
01006f8f23
196
API.REMOTE.rest
Executable file
196
API.REMOTE.rest
Executable file
@ -0,0 +1,196 @@
|
|||||||
|
|
||||||
|
// REST Client for Visual Studio Code:
|
||||||
|
// https://marketplace.visualstudio.com/items?itemName=humao.rest-client
|
||||||
|
|
||||||
|
|
||||||
|
// STOCKS
|
||||||
|
|
||||||
|
// Create Product:
|
||||||
|
POST http://5.35.86.48/stocks/api/product/create
|
||||||
|
content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"plu": 11347,
|
||||||
|
"name": "Яблоки"
|
||||||
|
}
|
||||||
|
###
|
||||||
|
|
||||||
|
// Create Shop:
|
||||||
|
POST http://5.35.86.48/stocks/api/shop/create
|
||||||
|
content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Рынок"
|
||||||
|
}
|
||||||
|
###
|
||||||
|
|
||||||
|
// Create Stocks:
|
||||||
|
POST http://5.35.86.48/stocks/api/stocks/create
|
||||||
|
content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"plu": 1115,
|
||||||
|
"shop_id": 4,
|
||||||
|
"in_stock": 3789,
|
||||||
|
"in_order": 5000
|
||||||
|
}
|
||||||
|
###
|
||||||
|
|
||||||
|
// Increase Stocks by plu/shop_id:
|
||||||
|
PATCH http://5.35.86.48/stocks/api/stocks/increase
|
||||||
|
content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
//"id": 5,
|
||||||
|
"plu": "1111",
|
||||||
|
"shop_id": 4,
|
||||||
|
"increase_shelf": 12,
|
||||||
|
"increase_order": 15
|
||||||
|
}
|
||||||
|
###
|
||||||
|
|
||||||
|
// [Optional] Increase Stocks by id:
|
||||||
|
PATCH http://5.35.86.48/stocks/api/stocks/increase
|
||||||
|
content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"increase_shelf": 12,
|
||||||
|
"increase_order": 15
|
||||||
|
}
|
||||||
|
###
|
||||||
|
|
||||||
|
|
||||||
|
// Decrease Stocks by plu/shop_id:
|
||||||
|
PATCH http://5.35.86.48/stocks/api/stocks/decrease
|
||||||
|
content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
// "id": 5, // Optional OR:
|
||||||
|
"plu": 1112,
|
||||||
|
"shop_id": 4,
|
||||||
|
"decrease_shelf": 12,
|
||||||
|
"decrease_order": 15
|
||||||
|
}
|
||||||
|
###
|
||||||
|
|
||||||
|
// [Optional] Decrease Stocks by id:
|
||||||
|
PATCH http://5.35.86.48/stocks/api/stocks/decrease
|
||||||
|
content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"decrease_shelf": 12,
|
||||||
|
"decrease_order": 15
|
||||||
|
}
|
||||||
|
###
|
||||||
|
|
||||||
|
|
||||||
|
// Get Stocks:
|
||||||
|
|
||||||
|
// plu=1111
|
||||||
|
// shop_id=1
|
||||||
|
// shelf_from=0
|
||||||
|
// shelf_to=3800
|
||||||
|
// order_from=0
|
||||||
|
// order_to=10000
|
||||||
|
// page=1
|
||||||
|
// page_size=2
|
||||||
|
|
||||||
|
// [ALL PARAMS]:
|
||||||
|
GET http://5.35.86.48/stocks/api/stocks?plu=1111&shop_id=1&shelf_from=0&shelf_to=3800&order_from=0&order_to=10000&page=1&page_size=2
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
// [SANDBOX]:
|
||||||
|
GET http://5.35.86.48/stocks/api/stocks?shop_id=4&plu=1111&page=1&page_size=1
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
|
||||||
|
// Get Products:
|
||||||
|
|
||||||
|
// plu=1111
|
||||||
|
// name=appl
|
||||||
|
// page=1
|
||||||
|
// page_size=2
|
||||||
|
|
||||||
|
// [ALL PARAMS]:
|
||||||
|
GET http://5.35.86.48/stocks/api/products?plu=&name=ябл&page=1&page_size=2
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
|
||||||
|
//===============================================================================================================================
|
||||||
|
|
||||||
|
// Service 2
|
||||||
|
// Get History:
|
||||||
|
|
||||||
|
// plu=1111
|
||||||
|
// shop_id=1
|
||||||
|
// action=decreaseStocks
|
||||||
|
// date_from=1731906196 (Unix Timestamp)
|
||||||
|
// date_to=1731906196
|
||||||
|
// page=1
|
||||||
|
// page_size=3
|
||||||
|
|
||||||
|
|
||||||
|
// [ALL PARAMS]:
|
||||||
|
GET http://5.35.86.48/history/api/history?plu=1111&shop_id=1&action=create&date_from=105653336&date_to=2034634345&page=1&page_size=10
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
// [ALL]:
|
||||||
|
GET http://5.35.86.48/history/api/history?page=1&page_size=10
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
// [SANDBOX]:
|
||||||
|
GET http://5.35.86.48/history/api/history?&page=1&page_size=30&date_to=1731906190
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
|
||||||
|
//===============================================================================================================================
|
||||||
|
|
||||||
|
// Users
|
||||||
|
|
||||||
|
// Create User:
|
||||||
|
POST http://5.35.86.48/users/api/users/create
|
||||||
|
content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"firstName": "Иван",
|
||||||
|
"lastName": "Иванов",
|
||||||
|
"birthday": "2006-11-19 19:00:00.000 +00:00",
|
||||||
|
"sex": 1,
|
||||||
|
"problems": true
|
||||||
|
}
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
// Delete All Users
|
||||||
|
DELETE http://5.35.86.48/users/api/users/delete-all
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
// Create All Users
|
||||||
|
POST http://5.35.86.48/users/api/users/create-all
|
||||||
|
content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"count": 1000000
|
||||||
|
}
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
// Get Users
|
||||||
|
GET http://5.35.86.48/users/api/users?page=1&pageSize=10
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
// Reset Problems:
|
||||||
|
PATCH http://5.35.86.48/users/api/users/reset-problems
|
||||||
|
|
||||||
|
###
|
||||||
|
|
7
API.rest
7
API.rest
@ -1,4 +1,8 @@
|
|||||||
|
|
||||||
|
// REST Client for Visual Studio Code:
|
||||||
|
// https://marketplace.visualstudio.com/items?itemName=humao.rest-client
|
||||||
|
|
||||||
|
|
||||||
// STOCKS
|
// STOCKS
|
||||||
|
|
||||||
// Create Product:
|
// Create Product:
|
||||||
@ -190,6 +194,3 @@ PATCH http://localhost/users/api/users/reset-problems
|
|||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
POST http://localhost/users/api/rand-problems
|
|
||||||
|
|
||||||
###
|
|
||||||
|
15
README.md
15
README.md
@ -7,6 +7,8 @@
|
|||||||
Репозиторий `em-shop`
|
Репозиторий `em-shop`
|
||||||
Ссылка на git репозиторий с проектом: `https://git.checkerwars.com/leo/em-shop`
|
Ссылка на git репозиторий с проектом: `https://git.checkerwars.com/leo/em-shop`
|
||||||
|
|
||||||
|
Проект запущен по адресу `http://5.35.86.48/`
|
||||||
|
|
||||||
|
|
||||||
Исполнитель: `Leonid Ost`
|
Исполнитель: `Leonid Ost`
|
||||||
Email: `4267@mail.ru`
|
Email: `4267@mail.ru`
|
||||||
@ -14,6 +16,7 @@ Telegram: `@leo4267`
|
|||||||
Site: `checkerwars.com`
|
Site: `checkerwars.com`
|
||||||
|
|
||||||
Описание всех API находится в файле `API.rest`
|
Описание всех API находится в файле `API.rest`
|
||||||
|
В файле `API.REMOTE.rest` приведены рабочие ссылки на запущенный удаленный сервер
|
||||||
|
|
||||||
Все сервисы находятся в docker контейнерах:
|
Все сервисы находятся в docker контейнерах:
|
||||||
Запустить все: `run.all.sh`
|
Запустить все: `run.all.sh`
|
||||||
@ -21,25 +24,25 @@ Site: `checkerwars.com`
|
|||||||
|
|
||||||
|
|
||||||
### Stocks (Express.js)
|
### Stocks (Express.js)
|
||||||
Path API `http://localhost/stocks/api/`
|
Path API `http://5.35.86.48/stocks/api/`
|
||||||
|
|
||||||
### History (Express.js Typescript)
|
### History (Express.js Typescript)
|
||||||
Path API `http://localhost/history/api/`
|
Path API `http://5.35.86.48/history/api/`
|
||||||
|
|
||||||
### Users (Nest.js)
|
### Users (Nest.js)
|
||||||
Path API `http://localhost/users/api/`
|
Path API `http://5.35.86.48/users/api/`
|
||||||
Swagger: `http://localhost/users/api/docs/`
|
Swagger: `http://5.35.86.48/users/api/docs/`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Traefik dashboard
|
### Traefik dashboard
|
||||||
Path: `http://localhost/dashboard/`
|
Path: `http://5.35.86.48/dashboard/`
|
||||||
User: `admin`
|
User: `admin`
|
||||||
Password: `admin`
|
Password: `admin`
|
||||||
|
|
||||||
|
|
||||||
### RabbitMQ dashboard
|
### RabbitMQ dashboard
|
||||||
Path: `http://localhost:15672/`
|
Path: `http://5.35.86.48:15672/`
|
||||||
User: `rabbit`
|
User: `rabbit`
|
||||||
Password: `5jbya3ptfrezyop6gy8w`
|
Password: `5jbya3ptfrezyop6gy8w`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user