R
Railway13mo ago
Vexon

Application failed to respond

Project ID: a3d02844-50cd-462d-b23f-b6025e43fe69 I am trying to deploy Angular app on railway. That's my deploy log:
Warning: This is a simple server for use in testing or debugging Angular applications

locally. It hasn't been reviewed for security issues.

Binding this server to an open connection can result in compromising your application or

computer. Using a different host than the one passed to the "--host" flag might result in

websocket connection issues. You might need to use "--disable-host-check" if that's the

case.



- Building...

Initial Chunk Files | Names | Raw Size

main.js | main | 850.77 kB |

polyfills.js | polyfills | 82.71 kB |

styles.css | styles | 95 bytes |

| Initial Total | 933.57 kB

Application bundle generation complete. [7.578 seconds]

Watch mode enabled. Watching for file changes...

➜ Local: http://localhost:3000/

➜ Network: http://172.17.0.219:3000/
Warning: This is a simple server for use in testing or debugging Angular applications

locally. It hasn't been reviewed for security issues.

Binding this server to an open connection can result in compromising your application or

computer. Using a different host than the one passed to the "--host" flag might result in

websocket connection issues. You might need to use "--disable-host-check" if that's the

case.



- Building...

Initial Chunk Files | Names | Raw Size

main.js | main | 850.77 kB |

polyfills.js | polyfills | 82.71 kB |

styles.css | styles | 95 bytes |

| Initial Total | 933.57 kB

Application bundle generation complete. [7.578 seconds]

Watch mode enabled. Watching for file changes...

➜ Local: http://localhost:3000/

➜ Network: http://172.17.0.219:3000/
Service is ACTIVE but i still have got "Application failed to respond". I have already read docs and added
const server = app();
server.listen(3000, "0.0.0.0", () =>
const server = app();
server.listen(3000, "0.0.0.0", () =>
to my server.ts, but i still have the same problem. I even tried to force the port in my package.json start script ""cd ParkingOccupyApp && ng serve --host 0.0.0.0 --port 3000","
Solution:
if you have any build or start commands set in the service settings please remove them
Jump to solution
10 Replies
Percy
Percy13mo ago
Project ID: a3d02844-50cd-462d-b23f-b6025e43fe69
Brody
Brody13mo ago
in your angular.json make sure outputPath is set to dist https://github.com/brody192/angular-template/tree/main then copy the nixpack.toml and Caddyfile from this repo to yours
Vexon
VexonOP13mo ago
Still the same. New logs:
No description
Solution
Brody
Brody13mo ago
if you have any build or start commands set in the service settings please remove them
Vexon
VexonOP13mo ago
So i changed start and build options on railway to default. My scripts in package.json are "start": "cd ParkingOccupyApp && ng serve", "build": "cd ParkingOccupyApp && npm install && ng build --configuration=production" I still have Application failed to respond
Brody
Brody13mo ago
remove the cd ParkingOccupyApp part of those commands. set the root directory to /ParkingOccupyApp in the service settings. make sure the nixpacks.toml and Caddyfile are in the ParkingOccupyApp folder too
Vexon
VexonOP13mo ago
Both files are in ParkingOccupyApp folder (screenshot from repo). After changing root directory to /ParkingOccupyApp build failed. Full logs -
Brody
Brody13mo ago
you have a .txt extension on the Caddyfile, please remove that extension
Vexon
VexonOP13mo ago
Thanks, it works properly now
Brody
Brody13mo ago
awesome, glad to hear that!
Want results from more Discord servers?
Add your server