My Angular web doesn't works

SYSTEM INFORMATION
OS type and version Rocky Linux 8.6
Webmin version 7.7
Virtualmin version 2.021

Hello. I have created an Angular project on one of my virtual servers. The installation has been “clean” and without errors. The Angular server opens and works correctly, but the web, although the index.html is started, does not execute the scripts. It’s like it doesn’t detect Angular’s server. This should listen on port 4200.

I have added in Webmin → Networking → NetFirewallD the port 4200 TCP, but it still doesn’t work. Any ideas?

Angular is a framework of NodeJS so requires it to be installed. which version of NodeJS have you installed?

OK! it can be installed on PHP (but :person_shrugging:t2: ) check your PHP settings (someone else may be along to help with that type of install)

Angular CLI: 16.1.6
Node: 18.16.0
Package Manager: npm 9.8.1
OS: linux x64

which webserver? nginx or apache ?

I am assuming that the ng build --prod has been run on the development code. then only the ./dist/* files copied to your public_html (best done with file manager) this will give you all the typescript,html,css code. Again I’m assuming all the tests have been done elsewhere on the development system.

when the app is started you should get a message in the terminal indicating the port number (as this can be changed in the code - because everyone knows it defaults to 4200)

1 Like

Now it works. It does not support the “–prod” parameter. Just doing “ng built” and relocating the content of “/dist” has started to work.

Very thankful.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.