Skip to content

Commit

Permalink
Api fastify (#21)
Browse files Browse the repository at this point in the history
* added nodemon for livereload

* testing table insertion

* major refactor, change to fastify

* added missing config files

* changed nodejs runtime ver

Co-authored-by: João Duarte <jd@loqr.io>
  • Loading branch information
deluxor and João Duarte committed Mar 16, 2020
1 parent d563207 commit c454511
Show file tree
Hide file tree
Showing 43 changed files with 6,177 additions and 3,492 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Expand Up @@ -3,4 +3,4 @@ end_of_line = lf
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
insert_final_newline = true
26 changes: 9 additions & 17 deletions .env.local
@@ -1,23 +1,15 @@
APP_SERVER_PORT=3000
APP_SESSION_SALT=
FASTIFY_IGNORE_WATCH="node_modules .git"

# DEBUGGING PURPOUSES THIS SHOULD BE FALSE IN PRODUCTION MODE
DEV_MODE=true
PORT=3000

# LOGGING
# Maximum value for logging files (20MB)
MAX_LOG_SIZE=20000000
LOGS_TO_CONSOLE=true
LOGS_FILENAME=trackovid-19-backend.log
# DATABASE
DB_HOST=
DB_NAME=
DB_USER=
DB_PASS=
DB_PORT=

# FACEBOOK
FB_APP_ID=
FB_APP_SECRET=
FB_CALLBACK_URL=

# DATABASE
DB_HOST=db-1-ireland.chq033ncjfv4.eu-west-1.rds.amazonaws.com
DB_NAME=postgres
DB_USER=postgres
DB_PASS=
DB_PORT=54320
FB_CALLBACK_URL=
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Expand Up @@ -28,4 +28,4 @@ jobs:
- run: npm run build --if-present
# - run: npm test
env:
CI: true
CI: true
65 changes: 65 additions & 0 deletions .gitignore
Expand Up @@ -139,3 +139,68 @@ __pycache__
*~
.env
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Yarn lock
.yarn.lock

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# 0x
profile-*

# mac files
.DS_Store

# vim swap files
*.swp

# webstorm
.idea

# vscode
.vscode
*code-workspace

# clinic
profile*
*clinic*
*flamegraph*

# generated code
examples/typescript-server.js
test/types/index.js

#ENV
.env
2 changes: 1 addition & 1 deletion .nvmrc
@@ -1 +1 @@
12.16
12.16
67 changes: 67 additions & 0 deletions .serverless/cloudformation-template-create-stack.json
@@ -0,0 +1,67 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "The AWS CloudFormation template for this Serverless application",
"Resources": {
"ServerlessDeploymentBucket": {
"Type": "AWS::S3::Bucket",
"Properties": {
"BucketEncryption": {
"ServerSideEncryptionConfiguration": [
{
"ServerSideEncryptionByDefault": {
"SSEAlgorithm": "AES256"
}
}
]
}
}
},
"ServerlessDeploymentBucketPolicy": {
"Type": "AWS::S3::BucketPolicy",
"Properties": {
"Bucket": {
"Ref": "ServerlessDeploymentBucket"
},
"PolicyDocument": {
"Statement": [
{
"Action": "s3:*",
"Effect": "Deny",
"Principal": "*",
"Resource": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":s3:::",
{
"Ref": "ServerlessDeploymentBucket"
},
"/*"
]
]
}
],
"Condition": {
"Bool": {
"aws:SecureTransport": false
}
}
}
]
}
}
}
},
"Outputs": {
"ServerlessDeploymentBucketName": {
"Value": {
"Ref": "ServerlessDeploymentBucket"
}
}
}
}

0 comments on commit c454511

Please sign in to comment.