- Node.js installed (created using 12.16.1)
- API key set for OpenWeather API
- This key should be saved in an environment variable via
export WEATHER_KEY=<YOUR_API_KEY>
orWEATHER_KEY=<YOUR_API_KEY>
if on a Unix-type environment
- This key should be saved in an environment variable via
- Ensure that the environment variable for the OpenWeather API has been set per above.
- Run
npm install
- In one console window/tab execute
npm start
to start the React project - In a separate console window/tab execute
npm run start:lambda
to spin up the APIs
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Launches process to serve the serverless function inside ./functions
at localhost:9000
.
Builds the serverless functions inside ./functions
which will minify and optimize those files and output them to ./lambda
which is used by Netlify for serving.