shaundai / shaundays-node

Back-end of full-stack React and Node/Express App connected to Dark Sky API and Google Maps API. Displays the weather today and for the next five days. See the front-end code at github.com/shaundai/shaundays

Home Page:https://shaundays-weather.surge.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ShaunDays Back End

ShaunDays Back End

Node back end for ShaunDays React App.

Live project

See live project on Surge here: http://shaundays-weather.surge.sh/

Project Screen Shots

Main screen screenshot

Main Weather Screen

Search for weather screenshot

Search for misspelled city (user) brings up corrected search results

Reflection

Key Learnings:

* How to stand up a server using Node and Express.

* How to deploy the server to Heroku.

* How to get my React app to make API calls to my server.

Deploying the server to Heroku was more challenging than I originally thought it would be! One thing I wasn’t thinking about was that I was hiding my API key in a .env, but Heroku is reading from my Git repo. There is an option in the Heroku dashboard called config vars which is where you store your API keys safely. Wasn’t able to easily find this information in their documentation or anywhere on the web, so I’m going to write a blog post about this for anyone who runs into this issue in the future.

Another ‘gotcha’ was that Dark Sky STILL wanted to block CORS after putting together this server. Was able to resolve this by using cors anywhere in my call on the CLIENT side (tried server side and that didn’t work!)

About

Back-end of full-stack React and Node/Express App connected to Dark Sky API and Google Maps API. Displays the weather today and for the next five days. See the front-end code at github.com/shaundai/shaundays

https://shaundays-weather.surge.sh


Languages

Language:JavaScript 100.0%