This project is accompanied by https://github.com/noahaklem/weather-watcher-backend
Weather Watch is a frontend stateful application that make calls to an external rails api, also built by Noah Klem. The application features:
- Sign into a user profile consisting of a username and password
- Grant user a JWT authorization token
- Make a user profile consisting of a username and password
- Persist new user to rails api database
- Upload multiple forecasts
This application is made to be accompanied by the above rails api. However, it is possible to connect this frontend to another api. Although it would be a pain because this frontend is design specifically for this project. This frontend is set up with two default URLs for processing a fetch request that can be changed.
The HTTP verbs are POST and GET. You will see these actions set up in the actions folder under addForecast.js and onStartUp.js.
** This project makes use of Redux and state middleware. You will need to us understand that Redux state should note be manipulated throughout the project. However, you will see a moment in Redux's rootReducer folder that state is set to undefined and the default recuders are all set to default values at one time. That is because of the JWT token and expiration method.
JSON Web Token is used to authenticate a user in the rails API. This was purely for practice using JWT's.
In the command line run the following:
$ npm install
$ npm start
- Upon start up you will have access to as many forecast as you would like. Play around. Different states, different contries!