File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33WORKDIR /app
44
5- # Copy server package files
5+ # Copy server package files and install dependencies
66COPY server/package*.json ./
7- RUN npm install --production
7+ RUN npm install --production && npm list tsx
88
9- # Copy server source
9+ # Copy source code
1010COPY server/ ./
1111COPY shared/ ./shared/
1212
1313# Environment
1414ENV NODE_ENV=production
1515EXPOSE 5000
1616
17- # Start using tsx
18- CMD ["npm " , "start " ]
17+ # Start with explicit path to tsx
18+ CMD ["./node_modules/.bin/tsx " , "index.ts " ]
Original file line number Diff line number Diff line change 33 * Production-ready, no Vite dependencies
44 */
55
6+ console . log ( '========================================' ) ;
7+ console . log ( '🚀 SERVER STARTING - index.ts loaded' ) ;
8+ console . log ( 'Node version:' , process . version ) ;
9+ console . log ( '========================================' ) ;
10+
611// Try to load .env if it exists (local dev), but don't fail if it doesn't (Railway)
712try {
813 await import ( 'dotenv/config' ) ;
9- } catch {
10- // Railway doesn't need dotenv - env vars are injected directly
14+ console . log ( '✅ dotenv loaded' ) ;
15+ } catch ( e ) {
16+ console . log ( 'ℹ️ No dotenv (Railway mode)' ) ;
1117}
1218
1319// Log startup environment AND all environment variables to debug Railway
Original file line number Diff line number Diff line change 66 "scripts" : {
77 "dev" : " tsx index.ts" ,
88 "build" : " echo 'No build needed - using tsx runtime'" ,
9- "start" : " node --loader tsx --no-warnings index.ts"
9+ "start" : " tsx index.ts"
1010 },
1111 "dependencies" : {
1212 "@solana/spl-token" : " ^0.4.8" ,
You can’t perform that action at this time.
0 commit comments