Is full stack exercise for General Assembly SEI (Español 🇪🇸 ) students.
Is an application that provide 7 days weather forecast for a given location
The structure of this repo is following principles of monorepo
It is divided in two main packages
- Server: A simple Express server that receive
GET
request to/forecast?city=Madrid
would return a JSON payload with a weekly forecast of a given location. - Client A simple React application that render 7 days weather forecast for a given location
- Clone this repo
git clone git@github.com:pataruco/weather-forecast-monorepo.git
- Navigate to the folder
weather-forecast-monorepo
cd weather-forecast-monorepo
- Install dependencies
yarn
Please run the following commands in different console tabs
- To run the API server, type:
yarn workspace server start
- To run the React server, type:
yarn workspace client start
-
Login into heroku
heroku login
-
If you are not tet created an herku folder for this app, run the following, otherwise step this
heroku create --region=eu
-
Deploy
git push heroku master
-
Once is deployed and functional take the URL of the app and added as a value of the
REACT_APP_SERVER_URL
on.env.production
# ./client/.env.production
REACT_APP_SERVER_URL='https://hipster-name.herokuapp/forecast'
-
Create a react production build
yarn workspace client build
-
Deploy to Netlify
netlify deploy