Skip to content

Commit b232f1b

Browse files
committed
feat: adding some boiler plate code
1 parent 239de99 commit b232f1b

File tree

107 files changed

+1729
-168
lines changed

Some content is hidden

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

107 files changed

+1729
-168
lines changed

.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
DB_TYPE=sqlite
2+
DB_DATABASE=database.sqlite
3+
DB_SYNCHRONIZE=false
4+
5+
AUTH0_AUDIENCE=starter
6+
AUTH0_ISSUER_URL=purr.eu.auth0.com

apps/app/proxy.conf.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
"/api": {
33
"target": "http://localhost:5000",
44
"secure": false
5+
},
6+
"/graphql": {
7+
"target": "http://localhost:5000",
8+
"secure": false
59
}
610
}

bun.lockb

63 KB
Binary file not shown.

database.sqlite

16 KB
Binary file not shown.
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@
1313
{
1414
"files": ["*.js", "*.jsx"],
1515
"rules": {}
16-
},
17-
{
18-
"files": ["*.json"],
19-
"parser": "jsonc-eslint-parser",
20-
"rules": {
21-
"@nx/dependency-checks": "error"
22-
}
2316
}
2417
]
2518
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# backend-authorization
2+
3+
This library was generated with [Nx](https://nx.dev).
4+
5+
## Running unit tests
6+
7+
Run `nx test backend-authorization` to execute the unit tests via [Jest](https://jestjs.io).
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* eslint-disable */
2+
export default {
3+
displayName: 'backend-authorization',
4+
preset: '../../../jest.preset.js',
5+
testEnvironment: 'node',
6+
transform: {
7+
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
8+
},
9+
moduleFileExtensions: ['ts', 'js', 'html'],
10+
coverageDirectory: '../../../coverage/libs/backend/authorization',
11+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "backend-authorization",
3+
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
4+
"sourceRoot": "libs/backend/authorization/src",
5+
"projectType": "library",
6+
"tags": [],
7+
"targets": {
8+
"test": {
9+
"executor": "@nx/jest:jest",
10+
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
11+
"options": {
12+
"jestConfig": "libs/backend/authorization/jest.config.ts"
13+
}
14+
}
15+
}
16+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Module } from '@nestjs/common';
2+
import { ConfigModule } from '@nestjs/config';
3+
import { JwtModule } from '@nestjs/jwt';
4+
import { PermGuard } from './decorators';
5+
6+
@Module({
7+
imports: [
8+
ConfigModule,
9+
10+
JwtModule.register({
11+
signOptions: { expiresIn: '30d' },
12+
}),
13+
],
14+
providers: [PermGuard],
15+
exports: [JwtModule, PermGuard],
16+
})
17+
export class AuthorizationModule {}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { SetMetadata } from '@nestjs/common';
2+
3+
export const ALLOW_ANONYMOUS_META_KEY = 'allowAnonymous';
4+
5+
export const AllowAnonymous = () => SetMetadata(ALLOW_ANONYMOUS_META_KEY, true);

0 commit comments

Comments
 (0)