-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
27 lines (21 loc) · 803 Bytes
/
makefile
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
# all of the following commands are relative to the root folder of the project
run:
go run cmd/main.go
upload:
curl -X POST 127.0.0.1:5000/upload \
-H 'Authorization: Bearer $(token)' \
-F "filename=@./client/$(file)"
# NOTE: the response is stored in the file, wether successful or not
# could improve with a bash script -> store to file in case of success, output to terminal if it fails
download:
curl 127.0.0.1:5000/download?filename=$(file) \
-H 'Authorization: Bearer $(token)' \
-o ./client/$(output)
authenticate:
curl -XPOST 127.0.0.1:5000/authenticate \
-H 'Content-Type:application/json' \
-d '{"email":"kikoaudi2001@gmail.com", "pwd":"admin"}'
register:
curl -XPOST 127.0.0.1:5000/register \
-H 'Content-Type:application/json' \
-d '{"email":"$(email)", "pwd":"$(pwd)"}'