Enhance backend API with health check endpoint and update environment script

- Added a new health check endpoint to the public router in index.ts, returning a simple status response.
- Updated update-docker-env.sh to include the MinIO Dashboard URL in the environment configuration and output messages.
This commit is contained in:
chamiakJ
2025-04-28 16:22:54 +05:30
parent 79e8bb3734
commit bf1d48709c
2 changed files with 5 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ fi
# Frontend URLs
FRONTEND_URL="${HTTP_PREFIX}${HOSTNAME}:5000"
MINIO_DASHBOARD_URL="${HTTP_PREFIX}${HOSTNAME}:9001"
# Create or overwrite frontend .env.development file
mkdir -p worklenz-frontend
@@ -128,4 +129,5 @@ echo
echo "Frontend URL: ${FRONTEND_URL}"
echo "API URL: ${HTTP_PREFIX}${HOSTNAME}:3000"
echo "Socket URL: ${WS_PREFIX}${HOSTNAME}:3000"
echo "MinIO Dashboard URL: ${MINIO_DASHBOARD_URL}"
echo "CORS is configured to allow requests from: ${FRONTEND_URL}"

View File

@@ -5,5 +5,8 @@ import safeControllerFunction from "../../shared/safe-controller-function";
const public_router = express.Router();
public_router.post("/new-subscriber", safeControllerFunction(ClientsController.addSubscriber));
public_router.get("/health", (req, res) => {
res.status(200).json({ status: "ok" });
});
export default public_router;