This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Daily start ==================== --> | |
<section class="section about bg-gray" id="daily"> | |
<div class="container"> | |
<div class="row justify-content-center"> | |
<div class="col-10"> | |
<div class="heading"> | |
<h2 class="mb-2">New cases identified daily</h2> | |
<p>The chart demostrates daily confirmed cases on {{ updatedDate | date:'MMM dd yyyy' }}</p> | |
<hr> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<nav class="navbar navbar-fixed-top navigation " id="top-nav"> | |
</nav> | |
</div> | |
<app-overall-summary></app-overall-summary> | |
<app-daily-increase></app-daily-increase> | |
<app-countries-summary></app-countries-summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { AppRoutingModule } from './app-routing.module'; | |
import { AppComponent } from './app.component'; | |
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; | |
import { DailyIncreaseComponent } from './components/daily-increase/daily-increase.component'; | |
import { CountriesSummaryComponent } from './components/countries-summary/countries-summary.component'; | |
import { OverallTimelineComponent } from './components/overall-timeline/overall-timeline.component'; | |
import { OverallSummaryComponent } from './components/overall-summary/overall-summary.component'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; | |
import { environment } from '../../environments/environment'; | |
import { Observable, of, Subject } from 'rxjs'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class CovidService { | |
private overallSubject = new Subject<any>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit, AfterViewInit } from '@angular/core'; | |
import { CovidService } from './services/covid.service'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'] | |
}) | |
export class AppComponent { | |
title = 'angular-app'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constructor(private covidService: CovidService) {} | |
ngAfterViewInit(): void { | |
this.covidService.getLatest().subscribe((x) => { | |
//do something with the data | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const environment = { | |
production: true, | |
baseUrl: "https://s3-us-west-2.amazonaws.com/data.coronavirusnumber.com/api/timeline", | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit, ViewChild, ElementRef, AfterViewInit } from '@angular/core'; | |
import * as Chart from 'chart.js'; | |
import { CovidService } from 'src/app/services/covid.service'; | |
@Component({ | |
selector: 'app-daily-increase', | |
templateUrl: './daily-increase.component.html', | |
styleUrls: ['./daily-increase.component.scss'], | |
}) | |
export class DailyIncreaseComponent implements AfterViewInit { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# request a certificate and obtain CName value pairs validation | |
CERTIFICATE_ARN="$(aws acm request-certificate --domain-name asin.pro --validation-method DNS --subject-alternative-names *.asin.pro | jq -r '.CertificateArn')" | |
VALIDATION_CNAME="$(aws acm describe-certificate --certificate-arn $CERTIFICATE_ARN | jq -r '.Certificate.DomainValidationOptions[0].ResourceRecord.Name')" | |
VALIDATION_VALUE="$(aws acm describe-certificate --certificate-arn $CERTIFICATE_ARN | jq -r '.Certificate.DomainValidationOptions[0].ResourceRecord.Value')" | |
echo create a CNAME entry at your DNS provider - CNAME: $VALIDATION_CNAME with VALUE : $VALIDATION_VALUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws apigateway create-domain-name --domain-name '<MyDomain.com>' --endpoint-configuration "{ \"types\": [\"REGIONAL\"] }" --regional-certificate-arn $CERTIFICATE_ARN | |
aws apigateway get-rest-api --rest-api-id <API_GATEWAY_ID> | |
aws apigateway create-base-path-mapping --domain-name '<MyDomain.com>' --base-path '(none)' --stage 'production' --rest-api-id <API_GATEWAY_ID> |
OlderNewer