Can't deploy Angular application
I'm trying to deploy this front-end project of mine (https://github.com/raioxcape/raioxcape/tree/main/front-end), but I'm always getting the "Application failed to respond" screen after successfully deploying. I'm using
ng build
as the build command and ng serve
as the start command, with only one service variable, that is NODE_ENV=production
. What is wrong?Solution:Jump to solution
1. install serve with
npm i serve
2. set your start script to serve dist/front-end -s -n -L -p $PORT
...17 Replies
Project ID:
499c211e-ee48-4f8d-9cbf-b5569a601a8d
499c211e-ee48-4f8d-9cbf-b5569a601a8d
ng serve
starts a development server, not fit to run on railwaySo what should I use instead?
what folder does
ng build
output to?to
dist/front-end
Solution
1. install serve with
npm i serve
2. set your start script to serve dist/front-end -s -n -L -p $PORT
I'll try that
No need for
ng
before the command you provided?correct
Ok
make sure you are specifying build and start commands in the package.json and not in the service settings!!
Alright
I'll try all this later and I'll let you know what happened after
sounds good!
It worked!
The only problem is that the icon is not showing
Like, the icon on the tab
My app logo
I'm sure that would be an easy fix for you 🙂
Yeah, for sure! Thanks @Brody!!
no problem!