feat: Add simplified cloud deployment support for Render and other platforms#1
Draft
tblinka1996 wants to merge 5 commits into
Draft
feat: Add simplified cloud deployment support for Render and other platforms#1tblinka1996 wants to merge 5 commits into
tblinka1996 wants to merge 5 commits into
Conversation
- Add cloud-server-simple.js for cloud platform deployment - Update Dockerfile with proper build process and entry point - Add render.yaml for Render platform configuration - Create comprehensive cloud deployment documentation - Add test-deployment.js for verifying deployments - Include example configurations for multiple providers - Enable deployment to cloud platforms while maintaining local functionality - Support environment-based configuration for different LLM providers This allows users to deploy claude-code-router as a cloud service and use it with Claude Code via ANTHROPIC_BASE_URL, providing significant cost savings and always-available service without local resource usage.
…ent files - Keep cloud-server-simple.js (essential for cloud deployment) - Keep render.yaml (optional Render configuration) - Keep updated dockerfile (for Docker deployment) - Add simple RENDER_DEPLOY.md with quick setup instructions - Remove verbose documentation and test files For Render deployment, users only need: 1. Fork repo 2. Create Render service with: npm install && npm run build / node cloud-server-simple.js 3. Set environment variables (API key, base URL, model) 4. Use with Claude Code via ANTHROPIC_BASE_URL
…der dashboard - Remove render.yaml (not needed, can configure in Render UI) - Update RENDER_DEPLOY.md to clarify environment variables are set in dashboard - Now only essential file is cloud-server-simple.js for cloud deployment
…omplexity - Remove cloud-server-auth.js (overly complex for basic deployment) - Keep only essential cloud-server-simple.js for Render deployment - Update RENDER_DEPLOY.md with simplified setup instructions - Add security note about lack of authentication in basic setup - Focus on minimal viable deployment for Render platform For Render deployment, users only need: 1. Fork repo 2. Set build/start commands in Render UI 3. Configure environment variables (API keys) 4. Deploy and use with Claude Code via ANTHROPIC_BASE_URL
- Remove blog/ directory (documentation not needed for deployment) - Remove screenshoots/ directory (images not needed for deployment) - Remove docker-compose.yml and dockerfile (focus on Render deployment) - Remove config.json (auto-generated by cloud-server-simple.js) Keep only essential files: - cloud-server-simple.js (main deployment script) - RENDER_DEPLOY.md (deployment instructions) - package.json, package-lock.json (dependencies) - dist/ (compiled code) - src/ (source code) - README.md, LICENSE (project info) Tested: Server starts successfully and API endpoints work correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Simplified Cloud Deployment Support
This PR adds minimal, production-ready cloud deployment support to claude-code-router, enabling users to deploy the service to platforms like Render, Railway, Heroku, and others.
✨ Key Features
cloud-server-simple.jsfile for cloud deployment📁 Essential Files
cloud-server-simple.js- Main cloud deployment entry pointRENDER_DEPLOY.md- Complete deployment guidepackage.json,package-lock.json- Dependenciesdist/- Compiled codesrc/- Source code🔧 How It Works
Before (Local Only):
ccr code # Starts local service + Claude CodeAfter (Cloud + Local):
💰 Benefits
$0.14/1M tokens) vs Claude ($3.00/1M tokens)🧪 Testing Results
/v1/messages)📋 Quick Deployment (Render)
npm install && npm run buildnode cloud-server-simple.jshttps://your-app.onrender.com🔄 Backward Compatibility
All existing local functionality remains unchanged. This is purely additive - users can continue using
ccr codelocally while also having the option to deploy to the cloud.🧹 Code Cleanup
Removed unnecessary files to keep the deployment clean:
blog/directory (documentation not needed for deployment)screenshoots/directory (images not needed for deployment)docker-compose.yml,dockerfile(focusing on Render deployment)config.json(auto-generated by deployment script)This basic deployment does not include API key authentication between Claude Code and your Render service. Anyone with your Render URL can use your deployed service. For production use, consider adding authentication middleware.
📖 Documentation
This enhancement transforms claude-code-router from a local-only tool into a flexible service that can be deployed anywhere, providing significant cost savings and improved availability with minimal complexity.