DynamoDB Example
To run the example follow the steps below:
DynamoDB Setup
Run the docker image of DynamoDB
docker run -d --name gofr-dynamodb -p 2021:8000 amazon/dynamodb-local:1.22.0
Create table by running the following command in /examples/using-dynamodb
path
-
go test
Note : It should PASS all the test cases
Run
Now run the example on path /zopsmart/gofr/examples/using-dynamodb
by
go run main.go
Docker Build
To Build a docker image, follow the below steps:
On non linux machines :
GOOS=linux go build main.go
This will build a go binary
docker build -t using-dynamodb:$(date +%s) .
On linux machines(Ubuntu/Mac):
go build main.go
This will build a go binary
docker build -t using-dynamodb:$(date +%s) .