Created
October 22, 2018 06:08
-
-
Save sagar-gavhane/3922295859268da655db7c140dc4cba9 to your computer and use it in GitHub Desktop.
This code snippets is created during writting article on "Build a RESTful API with the Serverless Framework". article link is here => https://medium.com/@sgavhane70/build-a-restful-api-with-the-serverless-framework-d8cc548f8e0f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# serverless.yml | |
service: pokemon-service | |
provider: | |
name: aws | |
runtime: nodejs8.10 | |
stage: dev | |
region: us-east-1 | |
memorySize: 512 | |
functions: | |
pokemonFunc: | |
handler: index.handler | |
events: | |
- http: | |
path: pokemon | |
method: get | |
- http: | |
path: pokemon/{id} | |
method: get | |
- http: | |
path: pokemon | |
method: post | |
- http: | |
path: pokemon/{id} | |
method: put | |
- http: | |
path: pokemon/{id} | |
method: delete | |
plugins: | |
- serverless-offline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment