Skip to content

Serverless todo app using AWS API Gateway, Lambda and DynamoDB

Notifications You must be signed in to change notification settings

JoanRoucoux/serverless-nodejs-todo-app

Repository files navigation

Serverless Todo App - AWS Node.js Typescript

This project has been generated using the aws-nodejs-typescript template from the Serverless framework and based on the repository serverless-todo of Sidney Barrah.

For detailed instructions, please refer to the documentation.

Architecture

serverless-nodejs-todo-app

Installation

You will need the following packages installed locally,

  • AWS CLI
  • Node JS (8 or higher)
  • NPM

Local Development

Before starting local development you will need to run a couple of commands in separate bash windows,

npm install -g serverless
npm install
serverless dynamodb install

This will install DynamoDB locally.

Note: If you're running aws for the first time, run aws configure once to avoid errors.

You will need to setup environment variables, to do this create a .env file.

You can start the local DynamoDB, migrate tables and simulate lambda and API endpoints locally using the following command.

serverless offline start

Open a browser and go to the url http://localhost:8008/shell to access the web shell for dynamodb local.

See more information on DynamoDB Local advanced options and configuration.

Local Endpoints

POST create todo - http://localhost:3000/dev/todo/create

POST delete todo - http://localhost:3000/dev/todo/delete

POST Get todo - http://localhost:3000/dev/todo

POST update todo - http://localhost:3000/dev/todo/update

You can deploy the entire service via CloudFormation by running the following command.

serverless deploy

Remote Endpoints

POST create todo - https://API_GATEWAY_ID.eu-west-3.amazonaws.com/dev/todo/create

POST delete todo - https://API_GATEWAY_ID.eu-west-3.amazonaws.com/dev/todo/delete

POST Get todo - https://API_GATEWAY_ID.eu-west-3.amazonaws.com/dev/todo

POST update todo - https://API_GATEWAY_ID.eu-west-3.amazonaws.com/dev/todo/update

Once you finished interacting with the services, you can delete the stack by running this command.

serverless remove

About

Serverless todo app using AWS API Gateway, Lambda and DynamoDB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published