Skip to content

Commit af87626

Browse files
authored
Merge pull request #59 from cham11ng/dev
Merge dev to master
2 parents 633f97e + a6bc97f commit af87626

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+4081
-6819
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.env.docker

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
APP_HOST=0.0.0.0
2-
APP_PORT=8888
1+
APP_PORT=8000
32

43
CODE_SOURCE=/source
54

@@ -12,13 +11,8 @@ DB_USER=starter
1211
DB_PASSWORD=secret
1312

1413
# Log
15-
LOGGING_DIR=logs
1614
LOGGING_LEVEL=debug
1715

18-
# Tests
19-
TEST_APP_PORT=8080
20-
TEST_DB_NAME=app_test
21-
2216
# Authentication
2317
ACCESS_TOKEN_DURATION=10m
2418
REFRESH_TOKEN_DURATION=24h
@@ -30,3 +24,7 @@ MAIL_PORT=2525
3024
MAIL_HOST=smtp.mailtrap.io
3125
MAIL_SMTP_USERNAME=
3226
MAIL_SMTP_PASSWORD=
27+
28+
# Tests
29+
TEST_APP_PORT=8888
30+
TEST_DB_NAME=starter_test

.env.example

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
APP_HOST=127.0.0.1
21
APP_PORT=8000
32

3+
CODE_SOURCE=
4+
45
# Database Configurations
56
DB_CLIENT=pg
67
DB_HOST=127.0.0.1
@@ -10,13 +11,8 @@ DB_USER=
1011
DB_PASSWORD=
1112

1213
# Log
13-
LOGGING_DIR=logs
1414
LOGGING_LEVEL=debug
1515

16-
# Tests
17-
TEST_APP_PORT=8080
18-
TEST_DB_NAME=app_test
19-
2016
# Authentication
2117
ACCESS_TOKEN_DURATION=10m
2218
REFRESH_TOKEN_DURATION=24h
@@ -28,3 +24,7 @@ MAIL_PORT=2525
2824
MAIL_HOST=smtp.mailtrap.io
2925
MAIL_SMTP_USERNAME=
3026
MAIL_SMTP_PASSWORD=
27+
28+
# Tests
29+
TEST_APP_PORT=8080
30+
TEST_DB_NAME=starter_test

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
build
3+
volumes

.eslintrc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": [
5+
"security",
6+
"@typescript-eslint"
7+
],
8+
"parserOptions": {
9+
"ecmaVersion": 2018, // Allows for the parsing of modern ECMAScript features
10+
"sourceType": "module" // Allows for the use of imports
11+
},
12+
"ignorePatterns": ["./node_modules/*"],
13+
"extends": [
14+
"eslint:recommended",
15+
"plugin:security/recommended",
16+
"plugin:@typescript-eslint/recommended",
17+
"plugin:@typescript-eslint/eslint-recommended"
18+
],
19+
"rules": {
20+
"no-error-on-unmatched-pattern": "off",
21+
"@typescript-eslint/no-explicit-any": "off", // TODO: Remove this.
22+
"no-return-await": "off",
23+
"no-shadow": "off",
24+
"@typescript-eslint/no-shadow": ["error"]
25+
}
26+
}

.eslintrc.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
build:
1111
strategy:
1212
matrix:
13-
node-version: [10.x, 12.x]
13+
node-version: [16.x]
1414
platform: [ubuntu-latest]
1515

1616
runs-on: ${{ matrix.platform }}
@@ -19,7 +19,7 @@ jobs:
1919
postgres:
2020
image: postgres
2121
env:
22-
POSTGRES_DB: app_test
22+
POSTGRES_DB: starter_test
2323
POSTGRES_USER: postgres
2424
POSTGRES_PASSWORD: secret
2525
ports:
@@ -41,7 +41,7 @@ jobs:
4141
node-version: ${{ matrix.node-version }}
4242

4343
- name: Install dependencies
44-
run: yarn --frozen-lockfile
44+
run: yarn install
4545

4646
- name: Building source code
4747
run: yarn build
@@ -52,7 +52,10 @@ jobs:
5252
NODE_ENV: test
5353
DB_CLIENT: pg
5454
DB_PORT: 5432
55-
DB_HOST: 0.0.0.0
55+
DB_HOST: 127.0.0.1
5656
DB_USER: postgres
5757
DB_PASSWORD: secret
58-
TEST_DB_NAME: app_test
58+
TEST_DB_NAME: starter_test
59+
TEST_APP_PORT: 8888
60+
ACCESS_TOKEN_SECRET_KEY: 'somerandoma'
61+
REFRESH_TOKEN_SECRET_KEY: 'somerandomr'

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,13 @@ typings/
6565
# Build directory
6666
dist
6767
build
68+
volumes
69+
70+
# Yarn 2
71+
.yarn/*
72+
!.yarn/patches
73+
!.yarn/releases
74+
!.yarn/plugins
75+
!.yarn/sdks
76+
!.yarn/versions
77+
.pnp.*

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx sync-dotenv
5+
yarn lint-staged

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "none",
4+
"singleQuote": true,
5+
"printWidth": 80,
6+
"parser": "typescript",
7+
"tabWidth": 2
8+
}

0 commit comments

Comments
 (0)