commit
						75a9f06dbf
					
				
					 10 changed files with 2112 additions and 756 deletions
				
			
		|  | @ -14,15 +14,10 @@ RUN npm install --silent | |||
| # Root tsconfig.json | ||||
| COPY tsconfig.json ./ | ||||
| 
 | ||||
| WORKDIR /app/docs | ||||
| 
 | ||||
| COPY docs ./ | ||||
| 
 | ||||
| RUN npm run swagger | ||||
| 
 | ||||
| WORKDIR /app/backend | ||||
| 
 | ||||
| COPY backend ./ | ||||
| COPY docs /app/docs | ||||
| 
 | ||||
| RUN npm run build | ||||
| 
 | ||||
|  | @ -34,8 +29,8 @@ COPY package-lock.json backend/package.json ./ | |||
| 
 | ||||
| RUN npm install --silent --only=production | ||||
| 
 | ||||
| COPY ./docs /docs | ||||
| COPY --from=build-stage /app/backend/dist ./dist/ | ||||
| COPY --from=build-stage /app/docs/api ./docs/swagger | ||||
| 
 | ||||
| EXPOSE 3000 | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| { | ||||
|     "name": "dwengo-1-backend", | ||||
|     "version": "0.0.1", | ||||
|     "version": "0.1.1", | ||||
|     "description": "Backend for Dwengo-1", | ||||
|     "private": true, | ||||
|     "type": "module", | ||||
|  |  | |||
|  | @ -21,9 +21,9 @@ app.use(authenticateUser); | |||
| // Add response time logging
 | ||||
| app.use(responseTime(responseTimeLogger)); | ||||
| 
 | ||||
| // Swagger
 | ||||
| app.get('/api', apiRouter); | ||||
| app.use('/api', apiRouter); | ||||
| 
 | ||||
| // Swagger
 | ||||
| app.use('/api-docs', swaggerUi.serve, swaggerMiddleware); | ||||
| 
 | ||||
| async function startServer() { | ||||
|  |  | |||
|  | @ -1,10 +1,10 @@ | |||
| import { Response, Router } from 'express'; | ||||
| import studentRouter from './student.js'; | ||||
| import groupRouter from './group.js'; | ||||
| import assignmentRouter from './assignment.js'; | ||||
| import submissionRouter from './submission.js'; | ||||
| import classRouter from './class.js'; | ||||
| import questionRouter from './question.js'; | ||||
| import studentRouter from './students.js'; | ||||
| import groupRouter from './groups.js'; | ||||
| import assignmentRouter from './assignments.js'; | ||||
| import submissionRouter from './submissions.js'; | ||||
| import classRouter from './classes.js'; | ||||
| import questionRouter from './questions.js'; | ||||
| import authRouter from './auth.js'; | ||||
| import themeRoutes from './themes.js'; | ||||
| import learningPathRoutes from './learning-paths.js'; | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ import { Class } from '../entities/classes/class.entity.js'; | |||
| import { ClassDTO, mapToClassDTO } from '../interfaces/class.js'; | ||||
| import { mapToStudentDTO, StudentDTO } from '../interfaces/student.js'; | ||||
| import { mapToTeacherInvitationDTO, mapToTeacherInvitationDTOIds, TeacherInvitationDTO } from '../interfaces/teacher-invitation.js'; | ||||
| import { getLogger } from '../logging/initalize'; | ||||
| import { getLogger } from '../logging/initalize.js'; | ||||
| 
 | ||||
| const logger = getLogger(); | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| import { RequestHandler } from 'express'; | ||||
| import swaggerUi from 'swagger-ui-express'; | ||||
| import swaggerDocument from '../../docs/api/swagger.json'; | ||||
| import swaggerDocument from '../../docs/api/swagger.json' with { type: 'json' }; | ||||
| 
 | ||||
| const swaggerMiddleware: RequestHandler = swaggerUi.setup(swaggerDocument); | ||||
| 
 | ||||
|  |  | |||
|  | @ -16,7 +16,7 @@ const doc = { | |||
|             description: 'Development server', | ||||
|         }, | ||||
|         { | ||||
|             url: 'https://sel2-1.ugent.be/api', | ||||
|             url: 'https://sel2-1.ugent.be/', | ||||
|             description: 'Production server', | ||||
|         }, | ||||
|     ], | ||||
|  | @ -26,7 +26,7 @@ const doc = { | |||
|                 type: 'oauth2', | ||||
|                 flows: { | ||||
|                     implicit: { | ||||
|                         authorizationUrl: 'http://localhost:7080/realms/student/protocol/openid-connect/auth', | ||||
|                         authorizationUrl: 'https://sel2-1.ugent.be/idp/realms/student/protocol/openid-connect/auth', | ||||
|                         scopes: { | ||||
|                             openid: 'openid', | ||||
|                             profile: 'profile', | ||||
|  | @ -39,7 +39,7 @@ const doc = { | |||
|                 type: 'oauth2', | ||||
|                 flows: { | ||||
|                     implicit: { | ||||
|                         authorizationUrl: 'http://localhost:7080/realms/teacher/protocol/openid-connect/auth', | ||||
|                         authorizationUrl: 'https://sel2-1.ugent.be/idp/realms/teacher/protocol/openid-connect/auth', | ||||
|                         scopes: { | ||||
|                             openid: 'openid', | ||||
|                             profile: 'profile', | ||||
|  |  | |||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							|  | @ -1,6 +1,6 @@ | |||
| { | ||||
|     "name": "dwengo-1-frontend", | ||||
|     "version": "0.0.1", | ||||
|     "version": "0.1.1", | ||||
|     "description": "Frontend for Dwengo-1", | ||||
|     "private": true, | ||||
|     "type": "module", | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| { | ||||
|     "name": "dwengo-1-monorepo", | ||||
|     "version": "0.0.1", | ||||
|     "version": "0.1.1", | ||||
|     "description": "Monorepo for Dwengo-1", | ||||
|     "private": true, | ||||
|     "type": "module", | ||||
|  |  | |||
		Reference in a new issue
	
	 GitHub
							GitHub