How to Deploy Angular Application on Nginx?

Step 1. Setup Angular Application.

Step 2. Download Node.js from the Node website and install it.

Step 3. Create folder angular-project.

Step 4. Run this command to Install angular CLI.

npm i @angular/cli

If you want to install a particular CLI version.

 npm i @angular/[email protected]

Step 5. Create your project name.

ng new my-app Here you want to edit ng new project -name

Step 6. Download Nginx from websites.

Step 7. If you want to change the port or other thing go to.

D:\nginx-1.25.3\conf/ nginx.conf file

Step 8. Build the angular application.

ng build

Step 9. Generate a dist folder and copy an angular file.

Step 10. Copy the generated file and paste it to the index/HTML

D:\nginx-1.25.3\html\angular

Step 11. Start nginx server

nginx.exe

Step 12. Close the Nginx server.

close Nginx server nginx.exe -s quit

Thank you for reading my Article.


Similar Articles