Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Xen0Xys authored Dec 31, 2023
0 parents commit fa843e1
Show file tree
Hide file tree
Showing 47 changed files with 8,302 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .env.ci
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"
21 changes: 21 additions & 0 deletions .env.exemple
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"
72 changes: 72 additions & 0 deletions .eslintrc.js
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"
]
},
};
10 changes: 10 additions & 0 deletions .github/dependabot.yml
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"
36 changes: 36 additions & 0 deletions .github/workflows/nodejs-ci.yml
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
Loading

0 comments on commit fa843e1

Please sign in to comment.