This project aims to recreate the To-do list that was developed in the "Conceito do Node JS" challenge, using the knowledge of the Serverless module from the NodeJs trail. Challenge Link
- Typescript
- Serverless
- Serverless-offline
- Serverless-webpack
- Serverless-dynamodb-local
- Webpack
- Aws Lambda
Clone the project and run the following command to download dependencies:
Yarn:
yarn
Then run the following command to install dynamodb locally:
yarn serverless dynamodb install
With dynamodb installed on your local machine, enter the following command to run the database locally.
yarn serverless dynamodb start
#ou
yarn dynamodb:start
With the database already running on your machine, type the following command to be able to run the application:
yarn serverless offline
#ou
yarn dev
http://localhost:3000/dev/todo/{user_id}/create
Payload:
{
"id": "e6ee0b87-9776-4031-828e-59d09fb14a71",
"title": "foo bar",
"done": false,
"deadline": "2021-10-13 20:34"
}
http://localhost:3000/dev/todo/{user_id}/show
OutPut:
{
"Todo": [
{
"id": "e6ee0b87-9776-4031-828e-59d09fb14a71",
"user_id": "b3b8ab9f-2a6f-4d1d-ab7f-6bd759799260",
"title": "foo bar",
"done": true,
"deadline": "2021-10-13 20:34"
}
]
}