This is a Next.js project bootstrapped with create-next-app
.
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.
# Run
npm run test
# or
yarn test
# Run
ANALYZE=true yarn 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.