forked from MikeTeddyOmondi/locci-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.http
More file actions
93 lines (60 loc) · 1.8 KB
/
.http
File metadata and controls
93 lines (60 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@proxyUrl = http://localhost:8484
@controlUrl = http://localhost:8485
# ── Control API ───────────────────────────────────────────────────────────────
### Status — running mode + which service is active
GET {{controlUrl}}/api/v1/status
###
### Config — full loaded config as JSON
GET {{controlUrl}}/api/v1/config
###
### Metrics — (stub, wire up Prometheus)
GET {{controlUrl}}/api/v1/metrics
###
# ── Gateway mode — routed requests ────────────────────────────────────────────
# Requires: just demo-gateway (or just servers + just run-gateway)
### Users — routed to users_server (:3001)
GET {{proxyUrl}}/users
###
### Single user
GET {{proxyUrl}}/users/1
###
### Create user
POST {{proxyUrl}}/users
Content-Type: application/json
{
"name": "Dave",
"email": "dave@locci.cloud"
}
###
### Products — routed to products_server (:3002)
GET {{proxyUrl}}/products
###
### Single product
GET {{proxyUrl}}/products/1
###
### Create product
POST {{proxyUrl}}/products
Content-Type: application/json
{
"name": "Thingamajig",
"price": 14.99
}
###
### Pages — catch-all (^/) routed to web_server (:3003)
GET {{proxyUrl}}/pages
###
### Single page
GET {{proxyUrl}}/pages/1
###
# ── Load balancer mode — round-robin requests ─────────────────────────────────
# Requires: just demo-lb
# Every request cycles across :3001 → :3002 → :3003
### Round-robin request 1
GET {{proxyUrl}}/instance
###
### Round-robin request 2
GET {{proxyUrl}}/instance
###
### Round-robin request 3
GET {{proxyUrl}}/instance
###