{"id":23028622,"url":"https://github.com/luberlu/serverless-express-typescript-dynamodb","last_synced_at":"2025-06-18T21:32:44.475Z","repository":{"id":266515187,"uuid":"898481426","full_name":"luberlu/serverless-express-typescript-dynamodb","owner":"luberlu","description":"Serverless API with Express.js/TypeScript on AWS Lambda, using DynamoDB and including local development environment.","archived":false,"fork":false,"pushed_at":"2024-12-05T17:09:58.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T10:46:02.495Z","etag":null,"topics":["express","nodejs","serverless","serverless-dynamodb","serverless-offline","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luberlu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-04T13:25:57.000Z","updated_at":"2024-12-05T17:10:02.000Z","dependencies_parsed_at":"2024-12-05T11:36:30.768Z","dependency_job_id":null,"html_url":"https://github.com/luberlu/serverless-express-typescript-dynamodb","commit_stats":null,"previous_names":["luberlu/express-nosql-serverless","luberlu/serverless-express-typescript-dynamodb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luberlu%2Fserverless-express-typescript-dynamodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luberlu%2Fserverless-express-typescript-dynamodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luberlu%2Fserverless-express-typescript-dynamodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luberlu%2Fserverless-express-typescript-dynamodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luberlu","download_url":"https://codeload.github.com/luberlu/serverless-express-typescript-dynamodb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246885088,"owners_count":20849615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","nodejs","serverless","serverless-dynamodb","serverless-offline","typescript"],"created_at":"2024-12-15T14:11:51.423Z","updated_at":"2025-04-02T20:22:14.343Z","avatar_url":"https://github.com/luberlu.png","language":"TypeScript","readme":"# Express TypeScript API with Serverless Framework and DynamoDB\n\nThis project demonstrates how to develop and deploy a Node.js API service using Express and TypeScript, with a DynamoDB database, all running on AWS Lambda via the Serverless Framework. It also includes the ability to develop locally with `serverless-offline`.\n\n## Features\n\n- **Express.js** for handling routes and HTTP requests.\n- **TypeScript** for static typing and better code maintainability.\n- **DynamoDB** for user data storage.\n- **Serverless Framework** for easy deployment to AWS Lambda.\n- **Serverless Offline** for local development and testing.\n\n## Prerequisites\n\n- Node.js and npm installed on your machine.\n- An AWS account and configured credentials for deployment.\n\n## Installation\n\nClone the repository and install dependencies:\n\n```bash\ngit clone \u003crepo-url\u003e\ncd \u003crepo-name\u003e\nnpm install\n```\n\n## Local Offline Development\n\nTo develop locally, use `serverless-offline` and `serverless-dynamodb`:\n\n1. Install Serverless DynamoDB:\n\n   ```bash\n   serverless dynamodb install\n   ```\n\n2. Start the local server:\n\n   ```bash\n   npm run offline\n   ```\n\nThis will start:\n- A local API server on `http://localhost:3000`\n- A local DynamoDB emulator on port 8001\n\nYou can now test your endpoints locally:\n\n```bash\n# Create a user\ncurl --request POST 'http://localhost:3000/users' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\"name\": \"John\", \"userId\": \"someUserId\"}'\n\n# Get a user\ncurl http://localhost:3000/users/someUserId\n```\n\n## Deployment\n\nTo deploy your service to AWS, run:\n\n```bash\nserverless deploy\n```\n\nAfter deployment, you'll see output similar to:\n\n```\nService deployed to stack express-nosql-serverless-dev\nendpoint: ANY - https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com\nfunctions:\n  api: express-nosql-serverless-dev-api\n```\n\n## Usage\n\n### Create a User\n\nTo create a new user, send a POST request to the `/users` endpoint:\n\n```bash\ncurl --request POST 'https://xxxxxx.execute-api.us-east-1.amazonaws.com/users' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\"name\": \"John\", \"userId\": \"someUserId\"}'\n```\n\n### Get a User\n\nTo retrieve a user by `userId`, send a GET request to the `/users/:userId` endpoint:\n\n```bash\ncurl https://xxxxxxx.execute-api.us-east-1.amazonaws.com/users/someUserId\n```\n\n## Notes\n\n- Make sure your DynamoDB table is properly configured and IAM permissions are in place to allow DynamoDB access.\n- For production deployments, consider adding an authorizer to secure your API.\n\n## Contributing\n\nContributions are welcome. Please submit a pull request for any improvements or fixes.\n\n## License\n\nThis project is licensed under the MIT License.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluberlu%2Fserverless-express-typescript-dynamodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluberlu%2Fserverless-express-typescript-dynamodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluberlu%2Fserverless-express-typescript-dynamodb/lists"}