Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Serverless exemples and template configuration #123

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
a9cb956
Removed Server API infra.
m7vicente-vortx May 23, 2022
6ac5614
added servers and serverless.yml to project.
m7vicente-vortx May 23, 2022
e53f2c7
Added herbsshelf as serverless function.
m7vicente-vortx May 24, 2022
2480ea5
Added Semi notation as false.
m7vicente-vortx May 24, 2022
7f2ed59
Added handlers for all usecase
m7vicente-vortx May 24, 2022
854c13e
Created handlers for serverless.
m7vicente-vortx May 31, 2022
a74593c
Added graphql and rest handlers for lambda execution
m7vicente-vortx May 31, 2022
abaad81
Added spec for api.
m7vicente-vortx May 31, 2022
3b0919c
Re Added old api extruture for exemples and custom routes
m7vicente-vortx May 31, 2022
dfbde2c
Changed aws location to us-east-1
m7vicente-vortx May 31, 2022
5d4db1f
Added vs-code config for debug
m7vicente-vortx May 31, 2022
db1e0c2
Added .env support
m7vicente-vortx May 31, 2022
6df7ef8
undo changes to run /graphql and /api as functions
m7vicente-vortx Jun 6, 2022
88e316d
Added serverless debug option
m7vicente-vortx Jun 6, 2022
e94a02a
Removed apollo handler
m7vicente-vortx Jun 6, 2022
a69da22
Removed apollo handler
m7vicente-vortx Jun 6, 2022
b93fa38
Fix apollo dependency
m7vicente-vortx Jun 6, 2022
347d4c9
Fixed and updated dependencies.
m7vicente-vortx Jun 6, 2022
54732d9
Merge branch 'master' into poc-serverless-template
m7vicente Jun 6, 2022
5aa1626
Fixed package.lock.
m7vicente-vortx Jun 6, 2022
6bc7f96
Created default handler for ApiGateway lambda functions
m7vicente-vortx Jun 7, 2022
eefc859
Undo database config back to localhost
m7vicente-vortx Jun 7, 2022
ca9d532
Undo changes on config
m7vicente-vortx Jun 7, 2022
ff45b3e
Fixed herbs version.
m7vicente-vortx Jun 7, 2022
03a2ab8
Added serverless doc
m7vicente-vortx Jun 8, 2022
2e4993a
Fixed env names and added cross-env
m7vicente-vortx Jun 8, 2022
6f431d1
Merge branch 'master' into poc-serverless-template
m7vicente Jun 8, 2022
57ff2f4
Added function to read all handlers
m7vicente-vortx Aug 29, 2022
8904dd1
Fix: database client in configs
m7vicente-vortx Aug 29, 2022
5110c51
Refactor: Changed default user structure to operation and entity cont…
m7vicente-vortx Aug 30, 2022
9ead2db
Updated dependencies.
m7vicente-vortx Aug 30, 2022
d595a3a
Merge branch 'main' into poc-serverless-template
m7vicente-vortx Aug 30, 2022
d2d3e82
Fixed packge-lock
m7vicente-vortx Aug 30, 2022
e843383
Updated shelf handler.
m7vicente-vortx Aug 30, 2022
673ef0d
Removed sqllite config from file JSON.
m7vicente-vortx Aug 30, 2022
266aca3
Fixed http status code tretament.
m7vicente-vortx Sep 5, 2022
348c5eb
Updated user config import.
m7vicente-vortx Sep 5, 2022
97ef9bc
Merge branch 'main' into poc-serverless-template
m7vicente Sep 5, 2022
00edad7
Fixed Lint.
m7vicente-vortx Oct 1, 2022
5cce72d
Merge branch 'poc-serverless-template' of https://github.com/m7vicent…
m7vicente-vortx Oct 1, 2022
843f0e8
Merge branch 'main' into poc-serverless-template
m7vicente Oct 1, 2022
d1c728a
Fix lint.
m7vicente-vortx Oct 1, 2022
8aca3e4
Merge branch 'poc-serverless-template' of https://github.com/m7vicent…
m7vicente-vortx Oct 1, 2022
aa53f48
Undo fomarting.
m7vicente-vortx Oct 1, 2022
0aa565c
Fix lint.
m7vicente-vortx Oct 1, 2022
cba5311
Undo file removal.
m7vicente-vortx Oct 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .env.prd

This file was deleted.

11 changes: 11 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#SERVER OPTIONS
HERBS_EXCEPTION=audit
HTTP_PORT=4000

#DATABASE CONFIG
DATABASE_CLIENT=sqlite3
DATABASE_CONNECTION=file.sqlite:memDb1?mode=memory&cache=shared
DATABASE_HOST=
DATABASE_USER=
DATABASE_PASSWORD=
DATABASE_NAME=
12 changes: 12 additions & 0 deletions .env.stage
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#SERVER OPTIONS
HERBS_EXCEPTION=audit
HTTP_PORT=443

#DATABASE CONFIG
DATABASE_CLIENT=pg
DATABASE_CONNECTION=file.sqlite:memDb1?mode=memory&cache=shared
DATABASE_HOST=127.0.0.1
DATABASE_USER=postgres
DATABASE_PASSWORD=postgres
DATABASE_NAME=todolist_on_herbs_db

2 changes: 0 additions & 2 deletions .env.stg

This file was deleted.

3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"trailingComma": "es5"
"trailingComma": "es5",
"semi": false
}
8 changes: 8 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,13 @@
"request": "launch",
"type": "node-terminal"
},
{
"name": "Serveless",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "serverless"]
}
]
}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ View all the use cases your termnal.

REPL dynamically generated by [Herbs REPL](https://github.com/herbsjs/herbs2repl).

### Serverless

To expose all the usecases using Serverless offline instead `npm start` use `npm serverless`

View the yml configurated routes in terminal.

Handlers are used to obtain request parameters and usecase execution for default an specific function

### Settings

**Environment:**
Expand Down
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require('./src/infra/handlers'),
}
Loading