ocd-website/frontend/health.js
TheMaddax edb6faa351 feat: create project structure and update implementation files
- Created complete project directory structure:
  - Frontend with Next.js 15.2.3 app router structure
  - Backend with Express API endpoints
  - Docker configurations with security best practices
  - MongoDB initialization with schema validation
  - Nginx configuration with security headers

- Implemented core file templates:
  - Custom video player with transcript display options
  - MongoDB schemas with validation for Videos and Members
  - JWT authentication middleware with role-based access control
  - Docker Compose with resource limits and security
  - Frontend/backend package.json with dependencies

- Updated documentation:
  - Enhanced TECH_STACK with latest version details
  - Updated TO_DO.txt with WCAG 2.2 AA requirements
  - Updated planned_implementation.txt with current best practices
  - Refreshed all Memory Bank files with current state

- Security and accessibility improvements:
  - Added MongoDB 7.0 schema validation with
  - Enhanced video requirements with mandatory transcripts and thumbnails
  - Updated accessibility to WCAG 2.2 AA standards
  - Added security best practices for Docker deployments
2025-03-25 09:28:10 -05:00

24 lines
712 B
JavaScript

// Health check endpoint for frontend container
// Import necessary modules
import { createServer } from 'http';
// Create a simple server that responds to health check requests
const server = createServer((req, res) => {
// Only respond to /health path
if (req.url === '/health') {
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ status: 'ok', timestamp: new Date().toISOString() }));
} else {
res.writeHead(404);
res.end();
}
});
// Listen on a separate port to avoid conflicts with the Next.js server
server.listen(3001, () => {
console.log('Health check server running on port 3001');
});
// Export for use in Next.js
export default server;