Skip to content

kevin-dev71/nextjs-weather-app

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Deployment Pipeline

Getting Started

You need to be using:

Clone the repository & install dependencies:

git clone https://github.com/kevin-dev71/nextjs-weather-app.git

cd nextjs-weather-app

npm install
# or
yarn

Rename .env.example to .env.local and add OPENWEATHER_API_KEY

OPENWEATHER_API_BASE_URL=http://api.openweathermap.org
OPENWEATHER_API_KEY=
DEFAULT_CITY="santiago de chile"

if you dont have an Open weather API KEY, get one in this link

Run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

Testing

# Run
npm run test
# or
yarn test

Check Nextjs Bundlers with @next/bundle-analyzer

# Run
ANALYZE=true yarn build

Docker Production Build

# Run
docker-compose -f docker-compose.production.yml --env-file .env.local up --build
# or
docker build -f Dockerfile.production -t nextjs-weather-app:latest .
&&
docker run -p 3000:3000 --env-file .env.local nextjs-weather-app
# or
docker pull ghcr.io/kevin-dev71/nextjs-weather-app:latest
docker run -p 3000:3000 --env-file .env.local nextjs-weather-app

Open http://localhost:3000 with your browser to see the result.

Design Inspiration

dribble

Built With

Next JS React Redux SASS Jest Docker Vercel TypeScript