This is a simple weather app.
-
Clone the repository.
-
Run
npm install
to install the dependencies. -
Create a
.env
file in the root of your project. This file will hold your environment variables, such as API keys. Here's an example of what your.env
file might look like:API_KEY=your_api_key_here
Replace
your_api_key_here
with your actual API key. -
Run
node app.js
to start the server. -
Navigate to
http://localhost:3000/weather
in your web browser to see the weather data.
Please note that the .env
file and the fontawesome-free-6.5.1-web/
directory are included in the .gitignore
file, so they won't be tracked by Git. This is to prevent your API keys and other sensitive information from being exposed publicly.
This project uses Font Awesome icons. The icons are already included in the project files under public/fontawesome-free-6.5.1-web/
. To use an icon in your HTML, you can use an <i>
tag with the appropriate classes. For example, to use the cloud icon, you would use <i class="fas fa-cloud"></i>
.
This project uses Jest for testing.
- Run
npm install
to ensure Jest is installed. Jest is listed as a devDependency inpackage.json
, so it should be installed with this command if it isn't already. - Run the tests with the
npm test
command. This will run all test files in the project that match the*.test.js
pattern.
- Weather Info: Current weather and forecast for any location.
- Search: Search functionality for weather data with auto suggestion API.
- Responsive: Optimized for both desktop and mobile.
- Mobile and Print Optimized: Enhanced for mobile and print.
- Caching: Client-side caching for performance.
- Animations: User experience enriched with animations.
- Testing: Functionality tested with Jest.
- API: Uses a public API for weather data.