Deployment is the process, which includes all the processes required for preparing an application to run and operate in a specific environment that make an application available for use. Once we are ready for the deployment to a remote server, we have many options available for the deployment, such as:-
There are few simple steps for simple deployment, which includes following:-.
Step 1:- First create the production build, just navigate to project folder and run below command in terminal.
ng build --prod
Step 2:- Copy all the content from the output folder i.e. dist folder (by default) to a folder on the server.
Step 3:- Now, just configure the web server to redirect missing files requests to index.html.
There are few simple steps to deploy on GitHub pages, such as:-
Step 1:- First, create a GitHub account if you don't have one, and then create a repository for your project.
Step 2:- Now, build project using Github project repository name, just navigate to project folder and run below command in terminal.
ng build --prod --output-path docs --base-href //
Step 3:- Once the build is complete, make a copy of docs/index.html and rename it docs/404.html.
Step 4:- Now commit changes and push.
Step 5:- Now, on the GitHub project page, configure it to publish from the docs folder.
We can see our deployed page at https://