This repository holds the snippet to demonstrate how to deploy and test a lambda function with OpenWeatherMap API
- Install Serverless by running
npm install -g serverless
- An OpenWeatherMap API key from here
- A NodeJs environment
- Create a new
.env
file from the.env.example
file and enter your OPENWEATHER_KEY - Add OPENWEATHER_KEY value in your
serverless.yml
- Run
npm install
to install your dependencies
It is also possible to emulate API Gateway and Lambda locally by using serverless-offline
plugin. In order to do that, execute the following command:
serverless offline