generated from Xen0Xys/NestJS-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fa843e1
Showing
47 changed files
with
8,302 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# API settings | ||
HTTP_PORT=3000 | ||
HTTPS_PORT=3001 | ||
BIND_ADDRESS=0.0.0.0 | ||
# SERVER_TYPE can be http, https or both | ||
SERVER_TYPE=http | ||
PREFIX=/api/v1 | ||
|
||
# SSL settings | ||
SSL_KEY_FILE=keys/server.key | ||
SSL_CERT_FILE=keys/server.crt | ||
|
||
# JWT Security | ||
JWT_KEY=private_key | ||
TOKEN_DURATION=30d | ||
|
||
# Encryption | ||
SYMMETRIC_ENCRYPTION_KEY=encryption_key | ||
ASYMMETRIC_ENCRYPTION_KEY=encryption_key | ||
|
||
DATABASE_URL="file:database.db" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# API settings | ||
HTTP_PORT=3000 | ||
HTTPS_PORT=3001 | ||
BIND_ADDRESS=0.0.0.0 | ||
# SERVER_TYPE can be http, https or both | ||
SERVER_TYPE=http | ||
PREFIX=/api/v1 | ||
|
||
# SSL settings | ||
SSL_KEY_FILE=keys/server.key | ||
SSL_CERT_FILE=keys/server.crt | ||
|
||
# JWT Security | ||
JWT_KEY=private_key | ||
TOKEN_DURATION=30d | ||
|
||
# Encryption | ||
SYMMETRIC_ENCRYPTION_KEY=encryption_key | ||
ASYMMETRIC_ENCRYPTION_KEY=encryption_key | ||
|
||
DATABASE_URL="file:database.db" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
module.exports = { | ||
parserOptions: { | ||
esmaVersion: "latest", | ||
sourceType: "module" | ||
}, | ||
parser: "@typescript-eslint/parser", | ||
plugins: [ | ||
"@typescript-eslint" | ||
], | ||
extends: [ | ||
"plugin:@typescript-eslint/recommended", | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
rules: { | ||
"@typescript-eslint/interface-name-prefix": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"indent": [ | ||
"error", 4, | ||
{ | ||
"SwitchCase": 1 | ||
} | ||
], | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"eol-last": [ | ||
"error", | ||
"always" | ||
], | ||
"object-curly-spacing": [ | ||
"error", | ||
"never" | ||
], | ||
"no-undef": [ | ||
"off" | ||
], | ||
"func-style": [ | ||
"error", | ||
"declaration" | ||
], | ||
"array-bracket-spacing": [ | ||
"error", | ||
"never" | ||
], | ||
"space-infix-ops": [ | ||
"error" | ||
], | ||
"space-before-function-paren": [ | ||
"error", | ||
"never" | ||
], | ||
"space-in-parens": [ | ||
"error", | ||
"never" | ||
], | ||
"space-before-blocks": [ | ||
"error", | ||
"never" | ||
] | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Node.js PR CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [21] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- name: Cache pnpm modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm- | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Run linter | ||
run: pnpm run lint | ||
- name: Run tests and coverage | ||
run: pnpm run test:cov |
Oops, something went wrong.