Avatar of Isaac
Isaac
Flag for United States of America asked on

Angular app not running

Hi All,

I am trying to run an angular application in cloud9.  The repository from Github that I forked can be found here.

I should be able to run the application in cloud 9 with the below command according to the author who has a course on pluralsight that I'm following.
ng serve -o

Open in new window


When I run it, I get the following
Angular Error
When I click on localhost:8080, it's not recognized.
not recognized
JavaScriptGitAngular

Avatar of undefined
Last Comment
Isaac

8/22/2022 - Mon
Sajeetharan Sinnathurai

It seems working fine in your local. Open the browser and type http://localhost:8080
not responding

I think the problem might have to do with a path. In that dir structure screenshot, your app.js file is in the src folder, but the public folder is up one level from there. The app.use statement can't see it when it not responding the visit the site give the suggestion.
Leonidas Dosas

If you see the notes at github it says that this plugin requires angular varsion 4.3 or higher.First check the path and then the angular version
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Julian Hansen

Is the browser running on the same sever as the one you ran ng serve on?

The report from the build process is good - so there should be a node instance listening on 8080 that you can connect to - but you will only be able to connect locally - you cannot connect from your host computer.
Isaac

ASKER
I am using an online IDE (https://c9.io/)
Isaac

ASKER
It does not work for me in http://localhost:8080

I'm not sure if Angular is using a different port.  This is all new to me
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Isaac

ASKER
Here's what I get for path and angular version.  It says undefined.
ang version
Julian Hansen

ng serve is reporting it is running on 8080 (usually defaults to 4200)
you can try
ng serve --port 4200 and then try to connect on localhost:4200

I need to check though - where is your browser running - is this on your local machine or on C9.io.

It can only work if the browser is running on the same physical machine as the one you ran ng serve on - it is no use opening a local browser and trying to connect - it won't work.
Isaac

ASKER
It's running on my local machine.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Julian Hansen

It's running on my local machine.
Do you mean the browser?
And your angular project is running on C9.io?

If that is the case it is never going to work. localhost refers to your local machine so the ng serve needs to be running locally as well - is this the case? I don't suspect so or you would probably not be having this problem.
Isaac

ASKER
Yes, it's the browser.  It makes sense what you are saying.  But it has to run in angular and I think it can....check this out  I think there is some configuration settings I need to do.
ASKER CERTIFIED SOLUTION
Julian Hansen

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Isaac

ASKER
Ok.  Thanks Julian!
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.