Skip to content

selfsryo/todo-management-serverless

Repository files navigation

todo-management-serverless

This is sample application of serverless framework.

Setup

Serveless setup

  • Install aws-cli
$ brew install awscli
  • Setup your credential
$ aws configure
  • Install serverless framework
$ yarn global add serverless

# After install, check version
$ sls --version

Install npm packages

  • Install package
$ cd todo-management-serverless
$ yarn

Local setup

  • Install JDK
$ brew install adoptopenjdk8 --cask
  • Copy env yml
$ cp .env.example.yml .env.local.yml
  • Install dynamodb local
$ sls dynamodb install
  • Start dynamodb
$ sls dynamodb start --stage local
  • Start serverless in a new tab
$ yarn run offline

Deploy

Setup S3 bucket

  • Create S3 bucket on your aws console

Develop stage

  • Copy and update env yml
$ cp .env.example.yml .env.dev.yml
$ vi .env.dev.yml
# Update table name and bucket name
  • Deploy stage develop
yarn run deploy

Production stage

  • Follow above steps and create env yml (Replace “dev” with "prod”)
  • Deploy stage production
$ sls deploy --stage prod

Remove Deploy

$ yarn run remove

About

This is sample application of serverless framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published