Skip to content

alx0-dev/node-weather-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Weather App

A simple weather app pet project made in Node, Express and ejs which leverages the OpenWeatherMap API. It displays the current weather information based on the entered city.

Installation and setup

Installation

This project uses node and npm. Go check them out if you don't have them locally installed.

$ npm install

Running the application

$ npm start

Running the application in dev mode

Dev mode utilizes nodemon which allows continuous monitoring for changes made in the app.

$ npm run dev

Opening the application

By default, the application is listening to port 5000.

http://localhost:5000/

Environment Variables

An .env file containing the environment variables needed by the application to run needs to be created in the root directory.

# .env

# Base url of the OpenWeatherMap API
API_URL='https://api.openweathermap.org/data/2.5/weather'

# API key generated in OpenWeatherMap
API_KEY='<OpenWeatherMap API key>'

# Port which the application is listening to
PORT=5000

OpenWeatherMap API

This application creates a request to the OpenWeatherMap API to get a city's current weather data.

Check OpenWeatherMap FAQs for instructions on how to create an API key.

More info on OpenWeatherMap Guide.

About

A weather app built with Node leveraging the OpenWeatherMap API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors