Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
miltonhit committed Dec 14, 2022
0 parents commit 25fd1c3
Show file tree
Hide file tree
Showing 29 changed files with 35,933 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
STAGE=dev
25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir : __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'on',
'@typescript-eslint/explicit-function-return-type': 'on',
'@typescript-eslint/explicit-module-boundary-types': 'on',
'@typescript-eslint/no-explicit-any': 'on',
},
};
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
.dynamodb/
.serverless/

# compiled output
/dist
/node_modules

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## hub-delivery-api
This API manages users, orders and other things of a food delivery.

## Stack
-> Node16+ with NestJs
-> Lambda with DynamoDB and Api Gateway
-> Serverless framework

## To run locally
Run those commands in the terminal:
1. npm install
2. npm dynamo (keep open)
3. npm run start
4. curl http://localhost:8000/service/status

## To deploy (aws provider)
1. Install serverless framework ([Click here] (https://www.serverless.com/framework/docs/getting-started))
2. run this command: serverless deploy
1 change: 1 addition & 0 deletions config/env/dev.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DB_RUN_LOCAL=false
Empty file added config/env/prd.env
Empty file.
5 changes: 5 additions & 0 deletions nest-cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src"
}
Loading

0 comments on commit 25fd1c3

Please sign in to comment.