This is a weather application built with Next.js using openweathermap API.
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of Node.js and npm
- Or you can download docker desktop and run the application via docker.
To install Weather App, follow these steps:
- Clone the repository:
git clone https://github.com/yourusername/weather-app.git
- Navigate into the project directory:
cd weather-app
- Install the dependencies:
npm install
To use Weather App, follow these steps:
-
Create
.env
file and insert your openweathermap api key, check.env.example
-
Start the development server:
npm run dev
- Open your web browser and navigate to
http://localhost:3000
.
- Build the docker image with:
docker build . -t 'insert image name'
- Run the image with:
docker run -p 3000:3000 'image name'
- Open your web browser and navigate to
http://localhost:3000
.
This project uses Jest for unit testing / component testing and Cypress for end-to-end testing.
To run the Jest tests:
npm run test
To run the Cypress tests:
- Build and start the application:
npm run build & npm run start
- run cypress tests:
npm run cypress:run