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:
Service is ACTIVE but i still have got "Application failed to respond". I have already read docs and added
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:Jump to solution
if you have any build or start commands set in the service settings please remove them
10 Replies
Project ID:
a3d02844-50cd-462d-b23f-b6025e43fe69
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
Still the same. New logs:
Solution
if you have any build or start commands set in the service settings please remove them
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
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 tooBoth files are in ParkingOccupyApp folder (screenshot from repo). After changing root directory to
/ParkingOccupyApp
build failed. Full logs -you have a
.txt
extension on the Caddyfile, please remove that extensionThanks, it works properly now
awesome, glad to hear that!