Spaces:
Sleeping
Sleeping
File size: 3,704 Bytes
0503b31 6d203c5 542878f 4c360fd 542878f 6d203c5 a1eed6b 0503b31 a1eed6b 0503b31 a1eed6b 542878f 0503b31 542878f 0503b31 542878f a1eed6b 0503b31 a1eed6b 0503b31 a1eed6b 0503b31 6d203c5 0503b31 6d203c5 0503b31 6d203c5 0503b31 6d203c5 0503b31 6d203c5 0503b31 6d203c5 0503b31 6d203c5 |
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 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
DEV_ENDPOINT=http://192.168.137.1:7860
PROD_ENDPOINT_0=https://qywok-tebakaja-proxy-space-0.hf.space
PROD_ENDPOINT_1=https://qywok-tebakaja-proxy-space-1.hf.space
PROD_ENDPOINT_2=https://qywok-tebakaja-proxy-space-2.hf.space
start:
go run main.go
haproxy-test:
haproxy -f ./haproxy/haproxy.cfg
nginx-test:
nginx -c nginx.conf
traefik-test:
traefik \
--configFile=./traefik/traefik.yaml \
--entryPoints.web.address=":7860" \
--entryPoints.websecure.address=":443" \
--entryPoints.web.http.redirections.entryPoint.to=websecure \
--entryPoints.web.http.redirections.entryPoint.scheme=https \
--api.dashboard=true \
--api.insecure=false
#
# --- Development Testing ---
#
stock-list-test:
curl -X GET $(DEV_ENDPOINT)/stock/lists
stock-prediction-test:
curl -X POST $(DEV_ENDPOINT)/stock/prediction \
-H "Content-Type: application/json" \
-d "{\"days\": 2, \"currency\": \"BTC-USD\"}"
crypto-list-test:
curl -X GET $(DEV_ENDPOINT)/crypto/lists
crypto-prediction-test:
curl -X POST $(DEV_ENDPOINT)/crypto/prediction \
-H "Content-Type: application/json" \
-d "{\"days\": 2, \"currency\": \"BTC-USD\"}"
natcurr-list-test:
curl -X GET $(DEV_ENDPOINT)/national-currency/lists
natcurr-prediction-test:
curl -X POST $(DEV_ENDPOINT)/national-currency/prediction \
-H "Content-Type: application/json" \
-d "{\"days\": 2, \"currency\": \"BTC-USD\"}"
#
# --- Production Testing (Proxy 0) ---
#
stock-list-prod-0:
curl -X GET $(PROD_ENDPOINT_0)/stock/lists
stock-prediction-prod-0:
curl -X POST $(PROD_ENDPOINT_0)/stock/prediction \
-H "Content-Type: application/json" \
-d "{\"days\": 7, \"currency\": \"BTC-USD\"}"
crypto-list-prod-0:
curl -X GET $(PROD_ENDPOINT_0)/crypto/lists
crypto-prediction-prod-0:
curl -X POST $(PROD_ENDPOINT_0)/crypto/prediction \
-H "Content-Type: application/json" \
-d "{\"days\": 7, \"currency\": \"BTC-USD\"}"
natcurr-list-prod-0:
curl -X GET $(PROD_ENDPOINT_0)/national-currency/lists
natcurr-prediction-prod-0:
curl -X POST $(PROD_ENDPOINT_0)/national-currency/prediction \
-H "Content-Type: application/json" \
-d "{\"days\": 7, \"currency\": \"BTC-USD\"}"
#
# --- Production Testing (Proxy 1) ---
#
stock-list-prod-1:
curl -X GET $(PROD_ENDPOINT_1)/stock/lists
stock-prediction-prod-1:
curl -X POST $(PROD_ENDPOINT_1)/stock/prediction \
-H "Content-Type: application/json" \
-d "{\"days\": 7, \"currency\": \"BTC-USD\"}"
crypto-list-prod-1:
curl -X GET $(PROD_ENDPOINT_1)/crypto/lists
crypto-prediction-prod-1:
curl -X POST $(PROD_ENDPOINT_1)/crypto/prediction \
-H "Content-Type: application/json" \
-d "{\"days\": 7, \"currency\": \"BTC-USD\"}"
natcurr-list-prod-1:
curl -X GET $(PROD_ENDPOINT_1)/national-currency/lists
natcurr-prediction-prod-1:
curl -X POST $(PROD_ENDPOINT_1)/national-currency/prediction \
-H "Content-Type: application/json" \
-d "{\"days\": 7, \"currency\": \"BTC-USD\"}"
#
# --- Production Testing (Proxy 2) ---
#
stock-list-prod-2:
curl -X GET $(PROD_ENDPOINT_2)/stock/lists
stock-prediction-prod-2:
curl -X POST $(PROD_ENDPOINT_2)/stock/prediction \
-H "Content-Type: application/json" \
-d "{\"days\": 7, \"currency\": \"BTC-USD\"}"
crypto-list-prod-2:
curl -X GET $(PROD_ENDPOINT_2)/crypto/lists
crypto-prediction-prod-2:
curl -X POST $(PROD_ENDPOINT_2)/crypto/prediction \
-H "Content-Type: application/json" \
-d "{\"days\": 7, \"currency\": \"BTC-USD\"}"
natcurr-list-prod-2:
curl -X GET $(PROD_ENDPOINT_2)/national-currency/lists
natcurr-prediction-prod-2:
curl -X POST $(PROD_ENDPOINT_2)/national-currency/prediction \
-H "Content-Type: application/json" \
-d "{\"days\": 7, \"currency\": \"BTC-USD\"}"
|