This is the backend server for the Health AI App, built with Node.js and Express.
- Secure API endpoints
- Environment variable management
- Rate limiting
- CORS support
- Security headers with Helmet
- Clone this repository
- Install dependencies:
npm install
- Create a
.envfile based on.env.exampleand fill in your environment variables - Start the server:
For development with auto-reload:
npm start
npm run dev
PORT: Server port (default: 3001)NODE_ENV: Environment (development/production)SUPABASE_URL: Your Supabase project URLSUPABASE_ANON_KEY: Your Supabase anonymous keySUPABASE_SERVICE_ROLE_KEY: Your Supabase service role keyJWT_SECRET: Secret for JWT token signingJWT_EXPIRE: JWT token expiration time
GET /api/health: Health check endpointGET /api/config: Returns configuration data for the frontend app
- Rate limiting is enabled on all
/api/routes - Security headers are added with Helmet
- Environment variables are used to keep sensitive data secure