• 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: v25
View latest version
deploy-to-railway.md

πŸš‚ Deploy to Railway - Step by Step

Quick Start (5 minutes)

1. Choose Your Runtime

Option A: Deno (Recommended)

  • Use deno-server.ts + railway.toml
  • Minimal changes from your Val Town code
  • No package management needed

Option B: Node.js

  • Use node-server.js + package.json
  • More familiar if your client prefers Node.js
  • Standard Express.js setup

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 Webflow Code

Replace your Val Town URL with the new Railway URL:

// OLD (Val Town) fetch('https://mattspieg--7bd2e46c406f11f083ce76b3cceeab13.web.val.run') // NEW (Railway) fetch('https://your-app.up.railway.app')

πŸŽ‰ You're Done!

Your proxy is now running on Railway with:

  • βœ… Same functionality as Val Town
  • βœ… 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
  • Compare response with your Val Town version

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. Backup: Keep your Val Town version as backup during transition

Your client will love the Railway deployment! 🎯

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.