Skip to content

Commit

Permalink
Merge pull request #2 from vzsoares/vzsoares/feat/more
Browse files Browse the repository at this point in the history
monolithic & microservice lambda
  • Loading branch information
vzsoares authored Aug 9, 2024
2 parents b6cae2f + f6b675f commit f8b90c6
Show file tree
Hide file tree
Showing 54 changed files with 2,139 additions and 177 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"root": true,
"ignorePatterns": ["**/*", "node_modules"],
"ignorePatterns": ["node_modules", "types", "dist"],
"plugins": ["@nx", "prettier"],
"overrides": [
{
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,7 @@ Thumbs.db
.esbuild
types
lib
.idea
.idea

**/.aws-sam

13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,16 @@

<p align="center"><img src="assets/a-gif-wow.gif"/></p>

</br>
</br>

> <p align="center">what's cooking? lambdas!</p>
<p align="center">what's cooking? lambdas!</p>

## Available Lambdas/Layers

They are separated by branches
see at **`lambdas`** folder

### Lambdas:

- [Typescript/Serverless](https://github.com/vzsoares/lambda-kitchen)

> this branch
- [Typescript/Zip](https://github.com/vzsoares/lambda-kitchen/tree/lambda-zip-typescript)

### Layers:
Expand Down Expand Up @@ -58,7 +53,7 @@ So here the solution, following this marketplace example
req example: api.marketplace.domain/auth/validateToken

```yaml
.api.marketplace/ #repoName=subdomain
.api.store/ #repoName=subdomain
├── auth/ #foldersName=subpath >>each are a lambda
│ ├── actions/
│ │ ├── validateToken.ts #actionName=path
Expand Down Expand Up @@ -95,8 +90,6 @@ Finally for the actions it basically is a function and its name relates to the _

## Useful stuff:

<br/>

### Use one bucket for all lambdas

by default serverless create one bucket for each lambda, and thats a problem because the account bucket limit is 100 by default
Expand Down
1 change: 0 additions & 1 deletion lambdas/typescript-layer/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*", "node_modules", "types"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
Expand Down
45 changes: 0 additions & 45 deletions lambdas/typescript-layer/.eslintrc.yml

This file was deleted.

5 changes: 1 addition & 4 deletions lambdas/typescript-layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
"types": "./types/index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint-fix": "eslint --config ./.eslintrc.json --ext .ts,.tsx --fix .",
"lint-check": "eslint --config ./.eslintrc.json --max-warnings=0 --ext .ts,.tsx .",
"prettier-format": "prettier --ignore-unknown --write .",
"prettier-check": "prettier --ignore-unknown --check .",
"check-types": "tsc --project ./tsconfig.json --noemit && echo 'Types are valid ✔︎'",
"deploy": "bash deploy.sh dev",
"deploy:prod": "bash deploy.sh dev prod",
"prepare": "husky install",
"postinstall": "bash prepare_local.sh"
"prepare": "husky install"
},
"lint-staged": {
"*.{ts,tsx,js,jsx}": "yarn lint-fix",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*", "node_modules"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
Expand Down
7 changes: 7 additions & 0 deletions lambdas/typescript-microservice-handlers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# typescript-function-based

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test typescript-function-based` to execute the unit tests via [Jest](https://jestjs.io).
Loading

0 comments on commit f8b90c6

Please sign in to comment.