Skip to content

Commit f45d3eb

Browse files
authored
Merge pull request #47 from cham11ng/refactor-v3
Refactor [Remove backpack and upgrade package version]
2 parents a3ec0a2 + 9861845 commit f45d3eb

Some content is hidden

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

49 files changed

+11894
-9051
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 & 6 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

@@ -15,10 +14,6 @@ DB_PASSWORD=secret
1514
LOGGING_DIR=logs
1615
LOGGING_LEVEL=debug
1716

18-
# Tests
19-
TEST_APP_PORT=8080
20-
TEST_DB_NAME=app_test
21-
2217
# Authentication
2318
ACCESS_TOKEN_DURATION=10m
2419
REFRESH_TOKEN_DURATION=24h
@@ -30,3 +25,7 @@ MAIL_PORT=2525
3025
MAIL_HOST=smtp.mailtrap.io
3126
MAIL_SMTP_USERNAME=
3227
MAIL_SMTP_PASSWORD=
28+
29+
# Tests
30+
TEST_APP_PORT=8888
31+
TEST_DB_NAME=starter_test

.env.example

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

43
# Database Configurations
@@ -13,10 +12,6 @@ DB_PASSWORD=
1312
LOGGING_DIR=logs
1413
LOGGING_LEVEL=debug
1514

16-
# Tests
17-
TEST_APP_PORT=8080
18-
TEST_DB_NAME=app_test
19-
2015
# Authentication
2116
ACCESS_TOKEN_DURATION=10m
2217
REFRESH_TOKEN_DURATION=24h
@@ -28,3 +23,7 @@ MAIL_PORT=2525
2823
MAIL_HOST=smtp.mailtrap.io
2924
MAIL_SMTP_USERNAME=
3025
MAIL_SMTP_PASSWORD=
26+
27+
# Tests
28+
TEST_APP_PORT=8080
29+
TEST_DB_NAME=starter_test

.eslintignore

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

.eslintrc

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

.eslintrc.js

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

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.yarn/releases/** binary
2+
/.yarn/plugins/** binary

.github/workflows/ci.yml

Lines changed: 6 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,8 @@ 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

.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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn sync-env && yarn lint-staged

0 commit comments

Comments
 (0)