-
Notifications
You must be signed in to change notification settings - Fork 1
PostgreSQL with TypeORM #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,8 @@ | |||
MONGODB_URI= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if you can add the env file gitignore and change it to sample.env
@@ -0,0 +1,25 @@ | |||
// module.exports = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is commented?
// rules: { | ||
// '@typescript-eslint/interface-name-prefix': 'off', | ||
// '@typescript-eslint/explicit-function-return-type': 'off', | ||
// '@typescript-eslint/explicit-module-boundary-types': 'off', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add the prettier rule here like single route to true etc
{ | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add sem to false and tabWidth to 2
@@ -0,0 +1,96 @@ | |||
# NestJS Boilerplate | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some more details here to describe the project's core features.
} | ||
|
||
@Post('loginEmployer') | ||
@HttpCode(HttpStatus.OK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add ApiResponse here
} | ||
|
||
@Post('verify-jwt') | ||
@HttpCode(HttpStatus.OK) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add ApiResponse here
} | ||
} | ||
|
||
// This route is protected by the JwtGuard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove comments
useFactory: () => ({ | ||
secret: process.env.JWT_SECRET, | ||
signOptions: { | ||
expiresIn: '3d', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add expires in to env file
EmployerModule, | ||
JwtModule.registerAsync({ | ||
useFactory: () => ({ | ||
secret: process.env.JWT_SECRET, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call env var from config
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
This boilerplate is equipped with a simple CRUD for two entities User(Employee) and Employer that shares a common auth module. The PostgreSQL database is used with TypeORM for interacting with database. JWT auth with access and refresh token strategy is setup for protected routing.
Issue Number: N/A
What is the new behavior?
PostgreSQL with TypeORM
Does this PR introduce a breaking change?
Other information
All other info is mentioned in readme.md file