This is an authentication service built with Express.js and TypeScript, designed to work with Railway deployment.
- API key exchange for JWT
- Token refresh
- Token validation
- Rate limiting
- CORS configuration
- Health check endpoint
This service is configured for deployment on Railway. Follow these steps to deploy:
- Ensure you have a Railway account and the Railway CLI installed.
- Initialize a new Railway project:
railway init - Add a Redis plugin to your Railway project:
railway add - Set up environment variables on Railway:
NEXT_PUBLIC_APP_URL: Your frontend application URL (e.g., https://app.example.com)NEXT_PUBLIC_API_URL: Your API URL (e.g., https://api.example.com)JWT_SECRET: Secret key for JWT signingREDIS_URL: Redis connection URLRABBITMQ_URL: RabbitMQ connection URLPORT: (Optional) Port number for the service (default: 3000)