Base setup for Angular and mapping the hosts file

You must set up the hosts file to map bucgenerichost to localhost and create a new Angular8 project.

Procedure

  1. Configure the hosts file to map bucgenerichost to localhost.
    For example,
    1. Open the hosts file.
      • Windows 10: C:\Windows\System32\drivers\etc\hosts
      • Mac OS: sudo nano /private/etc/hosts
      • Linux: sudo vim /etc/hosts
    2. Add the following entry to map bucgenerichost to localhost:
      127.0.0.1 localhost bucgenerichost
    3. If there is an existing entry that maps localhost, add bucgenerichost to the existing entry. For example,
      127.0.0.1 localhost <existing.custom.domain.mapping> bucgenerichost
  2. Create a new Angular8 project.
    1. Create an Angular project with style as scss.
      ng new <project name> --style=scss

      For example, ng new buc-custom-app-starter --style=scss

    2. Navigate to the project directory.
      cd <project name>
    3. Set the preferred package manager as yarn.
      ng config -g cli.packageManager yarn