Skip to main content

Posts

Showing posts from October, 2020

How deploy your angular project on GitHub Pages

Step 1:- Create Repository on github Note :- Open terminal and goto your project direcoty then run following command which you got after created repository. Step 2:- git init Step 3:- git add . Step 4:- git commit -m "first commit" Step 5:- git branch -M main Step 6:- git remote add origin https://github.com/rahuldrupal5788/DevR9angular.git Step 7:- git push -u origin main Step 8:- We need to build our code in production mode for that we will create deployment files that will be deployed on GitHub Pages. By default, this deployment code is generated in the /dist/<ProdectName> folder under the angular project folder, but we need to generate this in the "docs" folder under the angular project folder. So, we need to make a small change in the angular.json file and change the outputpath value to "docs/". Step 9:- Run the following command with the baseHref  option in the git bash window to generate deployment files in the docs folder. ng build --prod --b...

How to Install Angular 10 CLI and Setup an Angular 10 Project in Window 10?

In this blog, we will install Angular CLI and setup a new Angular 10 project. There are following steps :- Step-1 Here, We should check some prerequisites before setup angular project. System requirements Windows 10 OS 4 GB RAM 10 GB free space Step -2 Before install angular cli we will need nodejs and npm. What is Nodejs and why we need for angular development ? Node.js is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code outside of a browser. we use javascript to develop angular web application. Download Node Js from below url and run setup ( https://nodejs.org/en/download/?utm_source=blog ) Test Installation Open command line interface then run below command   node -v Step -3 What is npm and why we need for angular development ? Npm stands for node package manager, it is a dependency management tool for javascript applications. This tool will help to install the libraries and other tools to support angular development. Step -4  Ins...

How to install & enable the drupal commerce modules using composer in drupal 8

There are following steps that how to install & enable the drupal commerce modules using composer in drupal 8.9.6 Download Modules and Dependencies Step 1 :- composer require 'drupal/commerce:^2.21' Step 2:- composer require 'drupal/rules:^3.0' Step 3:- composer require 'drupal/ludwig:^1.0' Step 4:- Address Packages URL: /admin/reports/packages Install Modules and Dependencies Step 1:- vendor/bin/drush en address rules ludwig Step 2:- vendor/bin/drush en inline_entity_form entity_reference_revisions state_machine profile Step 3:- vendor/bin/drush en commerce commerce_cart commerce_checkout commerce_log commerce_number_pattern commerce_order commerce_payment commerce_price commerce_product commerce_promotion commerce_store commerce_tax Step 4:- Enable the trusted_host_patterns setting in the settings.php file $settings['trusted_host_patterns'] = [   '^www\.example\.com$',   '^localhost$', ]; Step 5:- Now navigate to the drupal commerce...

How to fix TRUSTED HOST SETTINGS Not enabled Error on localhost

Trusted host setting for XAMPP Server To enable the trusted host setting, we need to enable our hosts in $settings['trusted_host_patterns']. Open the "settings.php" file and update the below code to enable the trusted host setting: $settings['trusted_host_patterns'] = [      '^localhost$',      '^192\.151\.3\.101$',      '^127\.0\.0\.1$', ]; Here, '^localhost$',: This will allow the site to only run from localhost. '^192\.151\.3\.101$', : This will allow the site to only run from system IP '^127\.0\.0\.1$', : This will allow the site to only run from 127.0.0.1 instead of localhost. Note: When we are running multisite then we will define all host patterns that are allowed by the site.