Sls Todo app is to implement serverless framework api service with aws lambda, this app is simple add to do list to application and remove todo list after work or task is done.
This application will allow creating/removing/updating/fetching TODO items. Each TODO item can optionally have an attachment image. Each user only has access to TODO items that he/she has created.
Application store todo list You might also store an id of a user who created a TODO item.
- Auth0 account
- GitHub account
- NodeJS version up to 12.xx
- Serverless
- Create a Serverless account user
- Install the Serverless Framework’s CLI (up to VERSION=2.21.1). Refer to the official documentation for more help.
npm install -g [email protected] serverless --version
- Login and configure serverless to use the AWS credentials
# Login to your dashboard from the CLI. It will ask to open your browser and finish the process. serverless login # Configure serverless to use the AWS credentials to deploy the application # You need to have a pair of Access key (YOUR_ACCESS_KEY_ID and YOUR_SECRET_KEY) of an IAM user with Admin access permissions sls config credentials --provider aws --key YOUR_ACCESS_KEY_ID --secret YOUR_SECRET_KEY --profile serverless
To implement authentication in your application, you would have to create an Auth0 application and copy "domain" and "client id" to the config.ts
file in the client
folder. We recommend using asymmetrically encrypted JWT tokens.
The starter code comes with a configured Winston logger that creates JSON formatted log statements. You can use it to write log messages like this:
To deploy an application run the following commands:
cd backend
npm install
sls deploy -v
To run a client application first edit the client/src/config.ts
file to set correct parameters. And then run the following commands:
cd client
npm install
npm run start
This should start a development server with the React application that will interact with the serverless TODO application.