This is a simple weather application built on Angular Framework.
It uses GeoCities API
to provide auto-suggestion for world city names.
After choosing a city, weather forecast information will be fetched from OpeanWeatherMap API
to demonstrate the weather cards for given city.
You need to install the Node.js
and npm
package manager first.
You also need to create an account on OpenWeatherMap to obtain API key which is required to grab weather info.
Recommended IDE: VSCode + Angular Essentials
- Clone the repository.
git clone https://github.com/webceyhan/ng-weather-app.git
- Get inside the cloned project folder.
cd ng-weather-app
- Install NPM packages.
npm install
- Rename
.env.sample
file to.env
and put your API key in it.OPENWEATHER_API_KEY=
You can use following commands to do various task with the project.
npm start # run application
npm run serve # start development server
npm run test # run test suits
npm run build # build for production
Take a look at the other scripts in
package.json
Run the backend server first with npm start
which is needed for API calls.
Then 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.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
Run ng build
to build the project.
The build artifacts will be stored in the dist/
directory.
Use the --configuration production
flag for a production build.
Project is linked to Render for deployment.
It will automatically deploy the project to Render on every push.
Do not forget to add
OPENWEATHER_API_KEY
environment variable.
- Node.js
- Angular
- Bootstrap
- TypeScript
- Express (backend server)