Files
tm_back/test_swagger.sh
T
n.nakhostin 9119e2383e Add configuration file and update server settings
- Introduced a new `config.yaml` file for managing server, database, cache, queue, AI, scraping, logging, and rate limiting configurations.
- Updated `docker-compose.yml` to reflect the new server port (8081) and adjusted health check endpoints accordingly.
- Modified `Dockerfile` to expose the new server port.
- Updated `README.md` to reflect changes in server configuration and added documentation for the new configuration structure.
- Added test scripts for server and Swagger documentation testing.
- Refactored customer domain structure to align with new configuration settings and improve maintainability.
2025-08-02 12:37:04 +03:30

66 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
# Test Swagger Documentation Script
echo "🚀 Starting Tender Management API Server with Swagger Documentation..."
echo ""
# Build the application
echo "📦 Building application..."
make build
if [ $? -ne 0 ]; then
echo "❌ Build failed!"
exit 1
fi
echo ""
echo "✅ Build successful!"
echo ""
# Start the server in background
echo "🌐 Starting server..."
./bin/web &
SERVER_PID=$!
# Wait for server to start
echo "⏳ Waiting for server to start..."
sleep 3
# Check if server is running
if curl -s http://localhost:8081/health > /dev/null; then
echo "✅ Server is running!"
echo ""
echo "📚 Swagger Documentation is available at:"
echo " 🌐 http://localhost:8081/swagger/index.html"
echo ""
echo "🔍 Health Check endpoint:"
echo " 🌐 http://localhost:8081/health"
echo ""
echo "📋 Available API endpoints:"
echo " 🔐 Authentication:"
echo " POST /api/customers/login"
echo " POST /api/customers/refresh-token"
echo " 👤 Customer Profile:"
echo " GET /api/customers/profile"
echo " PUT /api/customers/profile"
echo " PUT /api/customers/change-password"
echo " 📱 Device Management:"
echo " POST /api/customers/device-token"
echo " DELETE /api/customers/device-token"
echo " 👥 Admin Operations:"
echo " POST /api/admin/customers/register"
echo " GET /api/admin/customers"
echo " GET /api/admin/customers/{id}"
echo " PUT /api/admin/customers/{id}/status"
echo ""
echo "🛑 To stop the server, press Ctrl+C or run: kill $SERVER_PID"
echo ""
# Keep the script running
wait $SERVER_PID
else
echo "❌ Server failed to start!"
kill $SERVER_PID 2>/dev/null
exit 1
fi