Skip to main content


Showing posts from June, 2022

Everything You Need to Know About HTTP in Angular and Making HTTP Request in Angular

  Before we start sending requests, it's important to understand the anatomy of an HTTP request because a HTTP request is made up of a couple of core parts which we'll all have a look at in this module here when it comes to configuring them when sending a request. The most important part about a request of course is the URL you are sending the request to, that's also called the API endpoint and it is something like for example, the exact path here of course depends on the API you're interacting with. However, when communicating with a RESTful API, it's not just about the URL but also about the HTTP verb you're using, something like post, get, put. This defines which kind of request you want to send to that endpoint, do you want to store a new data? Do you want to fetch data? Do you want to replace existing data? The HTTP verb makes that clear but it always depends on the API you're working with, which endpoints and which verbs for thes

How to Install Apache 2 on Linux 2 for Angular Application and How to fix 404 Error in Angular App

  Step 1: Launch an EC2 Instance(Linux 2) Before we install apache web server on the EC2 instance, we will need an EC2 instance up and running. You can refer my previous tutorial to launch a Linux 2 instance in AWS. Link to tutorial:   How to Launch EC2 Instance Step by Step in AWS Step 2: Connect to your Linux 2 instance Once your instance is up and running, you need to connect to your instance. I will be using EC2 instance connect feature for this as it allows to SSH into instance from browser itself. However, if you want to usual SSH, feel free to use below command from your terminal. ssh - i / path / my - key - pair . pem ec2 - user@instance - public - ip To SSH from browser using Instance connect, follow below steps. Select your instance and click connect   as highlighted below 2.  Once, you click Connect, you will see a screen with default username for a Linux 2 instance verify that  ec2-user  is showing in username field and click  Connect . A new browser window will open and yo