Angular Project Deployment on Live Server
Deploy your Angular application to a remote server.
Create a production build and copy the output directory to a web server.
- Start with the production build
- Copy everything within the output folder dist/ by default.
- Configure the server to redirect requests for missing files to index.html.
There is no single configuration that works for every server. The following sections describe configurations for some of the most popular servers.
Apache: add a rewrite rule to the .htaccess file as shown
Nginx: use try_files, as described in Front Controller Pattern Web Apps, modified to serve index.html
IIS: add a rewrite rule to web.config, similar to the one shown here
Firebase hosting: add a rewrite rule.
The base tag
In development, you typically start the server in the folder that holds index.html. That's the root folder and you'd add near the top of index.html because / is the root of the app.
But on the shared or production server, you might serve the app from a subfolder. For example, when the URL to load the app is something like http://www.mysite.com/my/app/, the subfolder is my/app/ and you should add to the server version of the index.html.
Please click below YouTube button for subscribe my channel truecodex for latest videos.
Angular Project Login - username: admin and password: admin
Angular 6/7 Tutorial in Hindi
truecodex.com provides video tutorial for enough understanding of all the necessary components of Angular 6 and Angular 7.
truecodex.com will keep uploading videos of the latest features of Angular. Please subscribe my channel for latest videos.