This project has been generated using the aws-nodejs-typescript
template from the Serverless framework.
For detailed instructions, please refer to the documentation.
Depending on your preferred package manager, follow the instructions below to deploy your project.
Requirements: NodeJS
lts/fermium (v.14.15.0)
. If you're using nvm, runnvm use
to ensure you're using the same Node version in local and in your lambda's run time.
- Run
npm i
to install the project dependencies - Run
npx sls deploy
to deploy this stack to AWS
- Run
yarn
to install the project dependencies - Run
yarn sls deploy
to deploy this stack to AWS
- RUN
yarn dynamo:start
- RUN
yarn dev
The project code base is mainly located within the src
folder. This folder is divided in:
functions
- containing code base and configuration for your lambda functionslibs
- containing shared code base between your lambdas
.
├── src
│ ├── functions # Lambda configuration and source code folder
│ │ ├── createTodo
│ │ │ ├── handler.ts # `/todos/{userid}` Essa rota deve receber o id de │ │ │ ├ um usuário pelo pathParameters (você pode criar esse id
│ │ │ ├ manualmente apenas para preencher o campo) e os seguintes
│ │ │ ├ campos no corpo da requisição:
│ │ │ ├ title e deadline, onde deadline é a data limite para o todo.
│ │ ├── verifyTodo
│ │ │ ├── handler.ts # `/todos/{userid}` A rota deve retornar os todos │ │ │ ├── que possuírem o user_id igual ao id recebido pelos parâmetros.
│
├── package.json
├── serverless.ts # Serverless service file
├── tsconfig.json # Typescript compiler configuration
├── tsconfig.paths.json # Typescript paths
└── webpack.config.js # Webpack configuration