fix docs and todo

This commit is contained in:
2026-02-15 11:42:43 -05:00
parent 37b423ce1a
commit ad599a0af7
5 changed files with 53 additions and 3373 deletions

View File

@@ -101,7 +101,7 @@ export PATH=$PATH:/path/to/odin
### Basic Usage
```bash
# Run with defaults (localhost:8000, ./data directory)
# Run with defaults (localhost:8002, ./data directory)
make run
```
@@ -118,10 +118,10 @@ You should see:
║ ║
╚═══════════════════════════════════════════════╝
Port: 8000 | Data Dir: ./data
Port: 8002 | Data Dir: ./data
Storage engine initialized at ./data
Starting DynamoDB-compatible server on 0.0.0.0:8000
Starting DynamoDB-compatible server on 0.0.0.0:8002
Ready to accept connections!
```
@@ -186,7 +186,7 @@ aws configure
**Create a Table:**
```bash
aws dynamodb create-table \
--endpoint-url http://localhost:8000 \
--endpoint-url http://localhost:8002 \
--table-name Users \
--key-schema \
AttributeName=id,KeyType=HASH \
@@ -197,13 +197,13 @@ aws dynamodb create-table \
**List Tables:**
```bash
aws dynamodb list-tables --endpoint-url http://localhost:8000
aws dynamodb list-tables --endpoint-url http://localhost:8002
```
**Put an Item:**
```bash
aws dynamodb put-item \
--endpoint-url http://localhost:8000 \
--endpoint-url http://localhost:8002 \
--table-name Users \
--item '{
"id": {"S": "user123"},
@@ -216,7 +216,7 @@ aws dynamodb put-item \
**Get an Item:**
```bash
aws dynamodb get-item \
--endpoint-url http://localhost:8000 \
--endpoint-url http://localhost:8002 \
--table-name Users \
--key '{"id": {"S": "user123"}}'
```
@@ -224,7 +224,7 @@ aws dynamodb get-item \
**Query Items:**
```bash
aws dynamodb query \
--endpoint-url http://localhost:8000 \
--endpoint-url http://localhost:8002 \
--table-name Users \
--key-condition-expression "id = :id" \
--expression-attribute-values '{
@@ -235,14 +235,14 @@ aws dynamodb query \
**Scan Table:**
```bash
aws dynamodb scan \
--endpoint-url http://localhost:8000 \
--endpoint-url http://localhost:8002 \
--table-name Users
```
**Delete an Item:**
```bash
aws dynamodb delete-item \
--endpoint-url http://localhost:8000 \
--endpoint-url http://localhost:8002 \
--table-name Users \
--key '{"id": {"S": "user123"}}'
```
@@ -250,7 +250,7 @@ aws dynamodb delete-item \
**Delete a Table:**
```bash
aws dynamodb delete-table \
--endpoint-url http://localhost:8000 \
--endpoint-url http://localhost:8002 \
--table-name Users
```
@@ -262,7 +262,7 @@ aws dynamodb delete-table \
const { DynamoDBClient, PutItemCommand, GetItemCommand } = require("@aws-sdk/client-dynamodb");
const client = new DynamoDBClient({
endpoint: "http://localhost:8000",
endpoint: "http://localhost:8002",
region: "us-east-1",
credentials: {
accessKeyId: "dummy",
@@ -279,13 +279,13 @@ async function test() {
name: { S: "Alice" }
}
}));
// Get the item
const result = await client.send(new GetItemCommand({
TableName: "Users",
Key: { id: { S: "user123" } }
}));
console.log(result.Item);
}
@@ -299,7 +299,7 @@ import boto3
dynamodb = boto3.client(
'dynamodb',
endpoint_url='http://localhost:8000',
endpoint_url='http://localhost:8002',
region_name='us-east-1',
aws_access_key_id='dummy',
aws_secret_access_key='dummy'
@@ -364,8 +364,8 @@ make fmt
### Port Already in Use
```bash
# Check what's using port 8000
lsof -i :8000
# Check what's using port 8002
lsof -i :8002
# Use a different port
make run PORT=9000
@@ -426,7 +426,7 @@ make profile
# Load test
ab -n 10000 -c 100 -p item.json -T application/json \
http://localhost:8000/
http://localhost:8002/
```
## Production Deployment