Skip to content
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

Login complete including integration with backend #8

Merged
merged 7 commits into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
},
"dependencies": {
"@nestjs/common": "^10.0.0",
"@nestjs/config": "^3.1.1",
"@nestjs/core": "^10.0.0",
"@nestjs/jwt": "^10.2.0",
"@nestjs/platform-express": "^10.0.0",
Expand Down
2 changes: 2 additions & 0 deletions Backend/src/app.module.ts
Glydric marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/

import { JwtModule } from '@nestjs/jwt';
import { ConfigModule } from '@nestjs/config';
import { Module } from '@nestjs/common';
import { MachineLearningController } from './app/machineLearning/machineLearning.controller';
import { FrontendController } from './app/frontend/frontend.controller';
Expand All @@ -14,6 +15,7 @@ import { LoginService } from './login/login.service';

@Module({
imports: [
ConfigModule.forRoot(),
JwtModule.register({
global: true,
secret: process.env.JWT_SECRET,
Expand Down
2 changes: 1 addition & 1 deletion Backend/src/database/database.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ export class DatabaseService {
return {};
}
}
}
}
2 changes: 1 addition & 1 deletion Backend/src/login/login.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ export class LoginService {
access_token: await this.jwtService.signAsync(user.name),
};
}
}
}
1 change: 1 addition & 0 deletions Backend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ async function bootstrap() {
const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup('swagger-api', app, document);

app.enableCors({ origin: true });
await app.listen(8080);

console.log(
Expand Down
1 change: 1 addition & 0 deletions Frontend/.env-example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_BACKEND_URL=http://localhost:8080/
Loading
Loading