/weather

A simple React weather app with an Express/MongoDB backend

Primary LanguageJavaScript

Weather app

This app was bootstrapped with create-react-app, and uses @material-ui, apisauce, autosuggest-highlight, and lodash.throttle

The server is written in Node using Express, cors, and Mongoose, to connect to a MongoDB database.

The email script uses emailjs, the darksky API, and Google Geocoder

Configuration

If you do not have MongoDB installed to run the app locally, you can do so by following the instructions here;

Once mongo is installed, run mongod to start the db.

Create a .env file in the root folder and add the keys REACT_APP_GOOGLE_API_KEY=YOUR_API_KEY and DARK_SKY_API_KEY=YOUR_API_KEY. For the Google API key, please use the key supplied via email. For the Dark Sky API, all you need to do is create an account here and it will generate an API key for you.

Finally, install dependencies using npm install.

Startup

To run the production built app and server, use npm start and visit localhost:3001. npm run react will run just the client app in dev mode at localhost:3000.

To run the script, use npm run email;