No longer need makefile may reimplment later.

This commit is contained in:
2026-04-29 08:13:48 +02:00
parent fb2a5b1499
commit 089051373e
-30
View File
@@ -1,30 +0,0 @@
# Variables
HOST=http://localhost:3333
COOKIE_FILE=cookies.txt
run:
go run cmd/main.go
# 1. Register a user
register:
curl -v POST $(HOST)/register \
-d "email=jason@debian.org" \
-d "password=pass123"
# 2. Login and SAVE the cookie to a file
login:
curl -v POST $(HOST)/login \
-d "email=jason@debian.org" \
-d "password=pass123" \
-c $(COOKIE_FILE)
# 3. Access a protected route using the saved cookie
test-auth:
curl GET $(HOST)/users \
-b $(COOKIE_FILE)
# 4. Cleanup
clean-cookies:
rm -f $(COOKIE_FILE)
.PHONY: run register login test-auth clean-cookies