Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.js
/.build
/.dynamodb
/node_modules
/node_modules
.DS_Store
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Serverless REST API with DynamoDB and offline support

## Note for edited full stack application

- Created a full-stack application where users can receive randomly generate famous quotes and have them displayed on wall for quotes
- Users can also create their own quotes
- Any quote updated or deleted
- Responsive front end

## How to use

```
npm install
sls dynamodb install
serverless offline start
cd frontend
npm install
npm start
```

This example demonstrates how to run a service locally, using the
[serverless-offline](https://github.com/dherault/serverless-offline) plugin. It
provides a REST API to manage Todos stored in a DynamoDB, similar to the
Expand Down Expand Up @@ -41,6 +59,7 @@ curl -X POST -H "Content-Type:application/json" http://localhost:3000/dev/todos
```

Example Result:

```bash
{"text":"Learn Serverless","id":"ee6490d0-aa11e6-9ede-afdfa051af86","createdAt":1479138570824,"checked":false,"updatedAt":1479138570824}%
```
Expand All @@ -52,6 +71,7 @@ curl -H "Content-Type:application/json" http://localhost:3000/dev/todos
```

Example output:

```bash
[{"text":"Deploy my first service","id":"ac90feaa11e6-9ede-afdfa051af86","checked":true,"updatedAt":1479139961304},{"text":"Learn Serverless","id":"206793aa11e6-9ede-afdfa051af86","createdAt":1479139943241,"checked":false,"updatedAt":1479139943241}]%
```
Expand All @@ -64,6 +84,7 @@ curl -H "Content-Type:application/json" http://localhost:3000/dev/todos/<id>
```

Example Result:

```bash
{"text":"Learn Serverless","id":"ee6490d0-aa11e6-9ede-afdfa051af86","createdAt":1479138570824,"checked":false,"updatedAt":1479138570824}%
```
Expand All @@ -76,8 +97,9 @@ curl -X PUT -H "Content-Type:application/json" http://localhost:3000/dev/todos/<
```

Example Result:

```bash
{"text":"Learn Serverless","id":"ee6490d0-aa11e6-9ede-afdfa051af86","createdAt":1479138570824,"checked":true,"updatedAt":1479138570824}%
```

No output
No output
6 changes: 6 additions & 0 deletions frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": true,
"trailingComma": "none",
"singleQuote": true,
"printWidth": 100
}
Loading