This is a simple Todolist application that represents a simple vue.js based frontend and a AWS Lambda based backend.
The frontend, after it was built, can be hosted statically. The Lambda functions, as well as well as the Dynamodb used for persistence, can be deployed via the serverless framework.
Prerequisites: node.js and npm needs to be installed.
- Install serverless:
npm install -g serverless
- Change into
todolist-lambda-backend
- run
npm install
- In
serverless.yml
replace<AWS_ACCOUNT_ID>
with your AWS account Id - run
serverless deploy
Keep the URLs of the created Lambda functions - you will need them to set up the frontend.
- Open
todolist-frontend/src/api/index.js
- Set
baseurl
which is the URL part all Lambda functions of your deployment have in common. (If the URL of an individual function ishttps://a12345678b.execute-api.us-east-1.amazonaws.com/dev/getTodos
,baseurl
would behttps://a12345678b.execute-api.us-east-1.amazonaws.com/dev
)
Prerequisites: node.js and npm needs to be installed.
- Change into
todolist-frontend
- run
npm install
- run
npm serve
After that, the dist folder will contain the built application with ain index.html
file as entry point.
Prerequisites: node.js and npm needs to be installed.
- Change into
todolist-frontend
- run
npm install
- run
npm build
After that, the dist folder will contain the built application with ain index.html
file as entry point.
- The frontend is based on this sample app.
- For the backend, this article served as a starting point.