Skip to content

iversonLv/aWeather

Repository files navigation

AWeather

This project was generated with Angular CLI version 10.0.0.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

Deploy

This project I deployed on github page, as follow some info for it:

https://angular.cn/guide/deployment

ng build --prod --output-path docs --base-href /aWeather/ run npm run predeploy After it copy index.html of docs folder and rename the copied file as 404.html then run git add . run git commit -am "Deploy base on {latest commit}" run git push https://github.com/iversonLv/aWeather.git

https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site

environment.ts environment.pro.ts

Key Value Description
API_URL https://weatherapi-com.p.rapidapi.com/ Main Api could open the rapid api page
API_KEY Please use your own one na
API_HOST weatherapi-com.p.rapidapi.com na

Todo list