{"id":517,"date":"2019-09-03T10:33:11","date_gmt":"2019-09-03T10:33:11","guid":{"rendered":"https:\/\/docs.theironnetwork.org\/vuely\/?page_id=517"},"modified":"2019-09-24T08:43:47","modified_gmt":"2019-09-24T08:43:47","slug":"deployment-3","status":"publish","type":"page","link":"https:\/\/docs.theironnetwork.org\/vuely\/deployment-3\/","title":{"rendered":"Deployment"},"content":{"rendered":"\n<h5>Simple Deployment<\/h5>\n\n\n\n<p>For the simple deployment, follow the steps given below:<\/p>\n\n\n\n<p><strong>Step 1:<\/strong> Make a production build, by running the command given below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ng build --prod<\/pre>\n\n\n\n<p>It will create the <code>dist<\/code> folder, that contains the production build files.<\/p>\n\n\n\n<p><strong>Step 2: <\/strong>Now you just need to upload the <code>dist<\/code> files on to the server.<\/p>\n\n\n\n<p><strong>Step 3: <\/strong>Configure the server to redirect requests for missing files to <code>index.html<\/code>. Learn more about server-side redirects below.<\/p>\n\n\n\n<h5 id=\"aot\">AOT<a href=\"#aot\"><\/a><\/h5>\n\n\n\n<p>It is <strong>Ahead-of-Time (AOT) compiler<\/strong>, which compiles your app at build time. For AOT compilation, include the <code>--aot<\/code> option with the commands.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ng build --prod --aot<\/pre>\n\n\n\n<h5 id=\"further-help\"><strong>Further help<\/strong><a href=\"#further-help\"><\/a><\/h5>\n\n\n\n<p>To get more help on the <code>angular-cli<\/code> use <code>ng --help<\/code> or for more details, please visit  <a href=\"https:\/\/github.com\/angular\/angular-cli\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/angular\/angular-cli<\/a>.<\/p>\n\n\n\n<h5 id=\"build-command\">Build command<a href=\"#build-command\"><\/a><\/h5>\n\n\n\n<p>We use the following command to build a production build. It will reduce the build size by optimizing the code at build time.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ng build --prod --aot --build-optimizer<br><\/pre>\n\n\n\n<h5 id=\"building-for-a-relative-path\">Building for a Relative Path<a href=\"#building-for-a-relative-path\"><\/a><\/h5>\n\n\n\n<p>If you want to make your production build in different folder or sub directory. Like, if you want that the template run on the <code>test.com\/output<\/code> rather then <code>test.com<\/code> then you need to follow the steps given below:<\/p>\n\n\n\n<p><strong>Step 1:<\/strong> Open the <code>src->index.html<\/code> file &amp; search for the base tag:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;base href=\"\/\"&gt;<\/pre>\n\n\n\n<p>and set your path as per requirement like:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;base href=\"\/output\/\"><\/pre>\n\n\n\n<p>After that you need to create a new sub folder with the name <code>output<\/code> and upload all the files in this folder.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>You need a .htaccess file to upload the build to server. Make sure you have included this file in your folder that you are going to upload on the server.<\/p><\/blockquote>\n<div class=\"pld-like-dislike-wrap pld-template-1\">\n    <div class=\"pld-like-wrap  pld-common-wrap\">\n    <a href=\"javascript:void(0);\" class=\"pld-like-trigger pld-like-dislike-trigger \" title=\"\" data-post-id=\"517\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-ip-check=\"0\" data-user-check=\"1\">\n                        <i class=\"fas fa-thumbs-up\"><\/i>\n                    <\/a>\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\n    <a href=\"javascript:void(0);\" class=\"pld-dislike-trigger pld-like-dislike-trigger \" title=\"\" data-post-id=\"517\" data-trigger-type=\"dislike\" data-ip-check=\"0\" data-restriction=\"cookie\" data-user-check=\"1\">\n                        <i class=\"fas fa-thumbs-down\"><\/i>\n                    <\/a>\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\n<\/div><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Simple Deployment For the simple deployment, follow the steps given below: Step 1: Make a production build, by running the command given below: ng build &#8211;prod It will create the dist folder, that contains the production build files. Step 2: Now you just need to upload the dist files on to the server. Step 3: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":59,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/pages\/517"}],"collection":[{"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/comments?post=517"}],"version-history":[{"count":2,"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/pages\/517\/revisions"}],"predecessor-version":[{"id":520,"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/pages\/517\/revisions\/520"}],"wp:attachment":[{"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/media?parent=517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}