You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -8,9 +8,11 @@ We will be working with an ehnahced task example where you will retrieve the tas
8
8
9
9
This project contains source code and supporting files for a sample application running on Express and NodeJS with Amazon DynamoDB local. It includes the following files and folders:
-`src` - Code for the express application and the APIs.
13
+
## Folder Description
14
+
15
+
-`src` - Code for the express application and the APIs, and sample script to populate table.
14
16
-`package.json` - Includes all the scripts to work on this project and the pre-requisites.
15
17
16
18
This application will create a couple of API methods to add and list the ToDos.
@@ -24,74 +26,69 @@ This application will create a couple of API methods to add and list the ToDos.
24
26
25
27
## Usage
26
28
27
-
To start working with this project you need to first run `npm install`.
28
-
29
-
### Running the tool in conjuntion with the front end.
30
-
31
-

32
-
33
29
### DynamoDB local
34
30
35
31
This application will store all the information in an Amazon DynamoDB local instance, you will experience all the benefits from Amazon DynamoDB in your workstation.
36
32
37
33
Execute the command `npm run start-db`. If this is the first time running the command your output should look like the one below. Docker will obtain the latest version for you!
38
34
39
-
```shell
35
+
To start working with this project you need to first run `npm install`.
36
+
37
+
```bash
40
38
❯ npm run start-db
41
39
42
-
>basic-backend@0.0.1 start-db
40
+
>enhanced-backend@0.0.1 start-db
43
41
>echo"CID=$(docker run -p $npm_package_config_ddbport:$npm_package_config_ddbport -d amazon/dynamodb-local -jar DynamoDBLocal.jar -sharedDb)"> .ddb_cid
44
-
45
-
Unable to find image 'amazon/dynamodb-local:latest' locally
Status: Downloaded newer image for amazon/dynamodb-local:latest
53
42
```
54
43
55
44
If you want to stop DynamoDB local execution you just need to run the command `npm run stop-db`. The long number at the end represents your docker container ID.
This project consists of a To-Do application and you will be storing all the items in a DynamoDB table. First you need to create a `Notes` table, where you will store all your to-dos.
57
+
This project consists of a To-Do application and you will be storing all the items in a DynamoDB table. First you need to create a `recipes-table` table, where you will store all your to-dos.
69
58
70
-
Run the command `npm run create-table`.
59
+
Run the command command. `npm run create-recipes-table`
To return all the elements from the `Notes` table you can run the command `npm run scan-table`. However if your table is empty you will get this output.
130
+
List all the elements in the `social-recipes` table (Scan a table). `npm run scan-recipes`. However if your table is empty you will get this output.
Finally to work with the sample express application, included in this project you will need to execute the instruction `npm run start-backend`, this process will start the express application that will be listening at port 3000.
@@ -167,7 +242,7 @@ Tip: execute this command in a new terminal
0 commit comments