• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
mattspieg

mattspieg

sg-luma-events

Public
Like
sg-luma-events
Home
Code
10
RAILWAY_MIGRATION.md
README.md
deno-server.ts
deploy-to-railway.md
H
luma-proxy.ts
main.tsx
node-server.js
package.json
railway.toml
test-local.sh
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
deploy-to-railway.md
Code
/
deploy-to-railway.md
Search
6/3/2025
Viewing readonly version of main branch: v31
View latest version
deploy-to-railway.md

πŸš‚ Deploy Luma CORS Proxy to Railway

Quick Setup (5 minutes)

1. Choose Your Runtime

Option A: Deno (Recommended)

  • Use deno-server.ts + railway.toml
  • Modern TypeScript runtime
  • No package management needed

Option B: Node.js

  • Use node-server.js + package.json
  • Traditional Node.js with Express
  • Standard npm ecosystem

2. Create GitHub Repository

# Create a new repository with your chosen files mkdir luma-cors-proxy cd luma-cors-proxy # For Deno deployment: cp deno-server.ts ./server.ts cp railway.toml ./railway.toml # OR for Node.js deployment: cp node-server.js ./server.js cp package.json ./package.json # Add your README cp README.md ./README.md # Initialize git and push git init git add . git commit -m "Initial commit - Luma CORS Proxy for Railway" git remote add origin https://github.com/yourusername/luma-cors-proxy.git git push -u origin main

3. Deploy to Railway

  1. Go to railway.app
  2. Sign up/Login (can use GitHub)
  3. Click "Deploy from GitHub repo"
  4. Select your repository
  5. Railway auto-detects your runtime and deploys!

4. Configure Environment (Optional)

In Railway dashboard:

  • Go to your project
  • Click "Variables" tab
  • Add: LUMA_API_KEY = secret-FMPoZlwNgVJ0qkCSn2EIHpTUA

5. Get Your URL

After deployment, Railway gives you a URL like:

https://luma-cors-proxy-production.up.railway.app

6. Test Your Deployment

# Test basic functionality curl https://your-app.up.railway.app # Test next3 filter curl "https://your-app.up.railway.app?next3=true" # Test with calendar ID curl "https://your-app.up.railway.app?calendar_id=cal-0pgAb0xbjL529WF&next3=true"

7. Update Your Frontend Code

Replace your API calls with the new Railway URL:

// Use your new Railway proxy fetch('https://your-app.up.railway.app') .then(response => response.json()) .then(data => { console.log('Luma events:', data); // Use your event data here });

πŸŽ‰ You're Done!

Your CORS proxy is now running on Railway with:

  • βœ… Serverless architecture
  • βœ… Custom domain support
  • βœ… Auto-scaling
  • βœ… Environment variables
  • βœ… Git-based deployments
  • βœ… Free tier available

πŸ”§ Troubleshooting

Deployment fails?

  • Check Railway logs in dashboard
  • Verify file names match the runtime choice
  • Ensure all files are committed to git

Proxy not working?

  • Test the health endpoint: /health (Node.js version)
  • Check environment variables are set
  • Verify the proxy returns expected JSON data

CORS issues?

  • Verify the proxy is returning proper CORS headers
  • Test with a simple curl command first
  • Check browser network tab for error details

πŸš€ Next Steps

  1. Custom Domain: Add your own domain in Railway dashboard
  2. Monitoring: Set up Railway's built-in monitoring
  3. Scaling: Configure auto-scaling if needed
  4. Security: Consider rate limiting for production use

Your Luma CORS proxy is ready to handle all your event data needs! 🎯

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
Β© 2026 Val Town, Inc.