Over the next 2 weeks, you'll be building a React App that works with various APIs (Application Programming Interfaces) that talk to different data sources to do cool stuff.
We're using the OpenWeather API to get weather data on different cities. Your challenge over the next 2 weeks is to build out this website and add even more functionality to it. At the moment, it displays basic information about a location when you type it in. Check out Issues for some more ideas!
You'll need to get your own API Key from their website (for free) and add it as an environment variable in a .env
file. We have a template available as example.env
.
You'll be using React initially to build this. If you're new to React, check out the website for some information on getting started!
To run a react project, you need to have the following prerequisite:
To test if node is installed, run
node -v
in your terminal.
To test if npm is installed, run
npm -v
in your terminal.
First you'll need to install the dependencies of the project.
- Run
npm install
in your terminal in the root of the project.
Then you'll need to start the development server. This will open a new tab in your browser and reload when you make a change.
- Run
npm start
in your terminal in the root of the project.
To build the project for production, run npm run build
.
More documentation on the scripts can be found here.