Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thesmartmonkey/create-serverless-simple-ts-service
Template of a simple serverless typescript api service with dynamodb
https://github.com/thesmartmonkey/create-serverless-simple-ts-service
aws-lambda aws-lambda-node serverless serverless-framework typescript
Last synced: about 17 hours ago
JSON representation
Template of a simple serverless typescript api service with dynamodb
- Host: GitHub
- URL: https://github.com/thesmartmonkey/create-serverless-simple-ts-service
- Owner: TheSmartMonkey
- License: mit
- Created: 2022-04-03T08:50:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-25T18:42:30.000Z (about 2 years ago)
- Last Synced: 2024-11-05T13:13:47.599Z (about 2 months ago)
- Topics: aws-lambda, aws-lambda-node, serverless, serverless-framework, typescript
- Language: TypeScript
- Homepage:
- Size: 41.7 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Serverless simple typescript service template
Template of a simple serverless typescript api service with dynamodb
## Installation
```bash
npx degit https://github.com/TheSmartMonkey/create-serverless-simple-ts-service serverless-ts-service
```Changes to be done
1. package.json config name
1. serverless.ts service name
1. Change the region in `serverless.ts` provider/region (current region: Paris)
## Getting started
1. Install serverless framework : [serverless framework Get Started](https://www.serverless.com/framework/docs/getting-started)
1. Setup your aws credentials : [aws config](https://www.serverless.com/framework/docs/providers/aws/guide/credentials)
Create a cloud formation stack on aws : `npm run deploy`
Remove a cloud formation stack on aws : `npm run undeploy`
## Manual test locally
In order to test the lambda functions locally, after you have deployed the stack a first times
for dependencies like dynamodb, run the following command:- `npx sls invoke local -f hello --path src/functions/hello/mock.json`
Check the [sls invoke local command documentation](https://www.serverless.com/framework/docs/providers/aws/cli-reference/invoke-local/) for more information.
## To simulate remote locally
In serverless.ts put environment/OFFLINE to 'true'
Then run `npm run offline`
Your `sls invoke local` commands now target your offline stack