Climatic is a weather data application built using various technologies, including React, Node.js, MongoDB, and hosted on Netlify using serverless functions.
For Visitor: Simply displays weather data in an HTML table for locations selected via a double-click event. No download options enabled.
For Authenticated User: Download weather data filtered by the timestamps of past interactions. The various formats available are:
- .json
- .xlsx
- .csv
- .txt
Climatic relies on some uncommon dependencies, including:
- mapbox-gl
- @mapbox/mapbox-gl-geocoder
- @reduxjs/toolkit- Much more simpler than configuring redux stores in the traditional manner
- exceljs
- react-csv
- react-datepicker
- redux-thunk
- Tomorrow.io's Weather API
Follow these steps to host Climatic on Netlify:
-
Clone the repository to your local machine.
-
Source the API keys and relevant connection URLs mentioned in the
.env.example
file. -
Hosting options:
-
Host the entire app under the same domain name (Option 1):
- Specify the functions folder in their website's UI.
- Specify all the environment variables in their UI.
-
Host the SPA separate from the serverless functions (Option 2):
- Set CORS headers in both pre-flight and response stages.
- Specify all the environment variables in their UI.
-
-
Change the
src/api/index.js
file to reflect the domain name of your choice.
If you choose to host the serverless functions on AWS Lambda/EC2 or a similar platform, you will need to set CORS headers in both the pre-flight and the response stage (since the domain names will differ now).
With these steps, you can easily deploy Climatic and start using it to access weather data.