https://github.com/thesoftwarehouse/serverless-boilerplate
Boilerplate for serverless framework applications
https://github.com/thesoftwarehouse/serverless-boilerplate
Last synced: about 1 month ago
JSON representation
Boilerplate for serverless framework applications
- Host: GitHub
- URL: https://github.com/thesoftwarehouse/serverless-boilerplate
- Owner: TheSoftwareHouse
- License: mit
- Created: 2020-10-29T15:21:58.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-24T11:35:17.000Z (about 1 year ago)
- Last Synced: 2025-04-26T16:43:59.988Z (about 1 month ago)
- Language: TypeScript
- Size: 32.5 MB
- Stars: 51
- Watchers: 14
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
##
Boilerplate code for rapidly creating ready-to-deploy Serverless Framework services.
##
### Quick Start
- **Install**
```
npm install
```rename .env.dist to .env, fill all information
- **Create lambda or workflow**
```
npm run plop
```##
### Development Local
- docker-compose up
- npm install
- rename .env.dist to .env
- fill all information
- npm run run-migrations
- npm run dev### Debugging locally
Serverless uses workers to run lambdas locally. To debug them in your IDE you need to add `--useInProcess` flag, or run the following command:
```
npm run dev-with-debug
```##
### Run workflow locally
```
npm run start-workflow --workflow=NAME_OF_THE_WORKFLOW
```### Follow workflow logs
To follow all the logs from the step function executions you can use the command:
```
npm run get-sf-logs
```##
### Develop workflow
We support ASL for Step Functions. Make sure to install AWS Toolkit so you can render graph for step functions and validate its syntax easily.
##
### SonarQube configuration
Before deployment, please ensure that a related SonarQube project has been created. After that set proper repository variables (`SONAR_TOKEN` and `SONAR_HOST_URL`) and properties in `sonar-project.properties` file.
##
### Deploy
The best choice for deployment is the bitbucket pipeline.
Deployment [pipeline](bitbucket-pipelines.yml) consist of two steps:
1. compile (automated start)
- build
- run lambda offline
- run test
2. deploy (user action required)##
### Other good source of information
- https://serverless.com/framework/docs/providers/aws/guide/variables/
- https://serverless.com/framework/docs/providers/aws/cli-reference/config-credentials/##
### What do we use for testing lambdas?
1. [supertest](https://github.com/visionmedia/supertest#readme)
1. [mocha](https://mochajs.org/)Here you can check example tests: [handler.spec.ts](functions/example-lambda/tests/handler.spec.ts)
##
### What do we use for validating schemas?
We use [zod](https://zod.dev/) for schema validation.
##
### **Issues:**
If you notice any issues while using, let as know on **[github](https://github.com/TheSoftwareHouse/serverless-boilerplate/issues)**.
Security issues, please send on email### **You may also like our other projects:**
- **[RAD Modules](https://github.com/TheSoftwareHouse/rad-modules)**
- **[RAD Modules Tools](https://github.com/TheSoftwareHouse/rad-modules-tools)**
- **[Kakunin](https://github.com/TheSoftwareHouse/Kakunin)**
- **[Babelsheet-js](https://github.com/TheSoftwareHouse/babelsheet-js)**
- **[Fogger](https://github.com/TheSoftwareHouse/fogger)**### **About us:**
##
### License
[](https://raw.githubusercontent.com/TheSoftwareHouse/serverless-boilerplate/main/LICENSE)
This project is licensed under the terms of the [MIT license](/LICENSE).