API for participation requests
- Install Node JS
- Install Serverless
npm install -g serverless
- Install AWS CLI
- Configure KEY AWS CLI
- The project folder
code
run the commandnpm install
- In the
serverless.yaml
file comment the iamRoleStatements and runsls deploy
- In the AWS Console search the DynamoDB for the Resource code, paste it into the
iamRoleStatements.Resource
withinserverless.yaml
and discard the iamRoleStatements - The project folder / run the command
sls deploy
- Change the URL in the site project to the one obtained in deploy
-
GitHub Page - Click to watch and test
-
Page Code - Web Site Code
URL: https://p2qeldjm6f.execute-api.us-east-1.amazonaws.com/dev/
curl 'https://p2qeldjm6f.execute-api.us-east-1.amazonaws.com/dev/'
curl --header "Content-Type: application/json" \
--request POST \
--data '{ "firstName": "Maria", "lastName": "Felisberto", "participation": 50 }' \
https://p2qeldjm6f.execute-api.us-east-1.amazonaws.com/dev/
curl --header "Content-Type: application/json" \
--request DELETE \
--data '{ "id": "4d9e5460-15fa-11e9-b395-e13752e335c5"}' \
https://p2qeldjm6f.execute-api.us-east-1.amazonaws.com/dev/
- Node.Js - JavaScript runtime
- AWS Lambda - Run code without thinking about servers
- Serverless - The most widely-adopted toolkit for building serverless applications
- DynamoDB - Fast and flexible NoSQL database service for any scale
- AWS SDK - The official AWS SDK for JavaScript
- uuid - Universally Unique Identifier
- Vinícius Felisberto - Front-end and Back-end - vifelisberto