Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Arquisoft/wiq_es05a into…
Browse files Browse the repository at this point in the history
… develop
  • Loading branch information
uo276026 committed Apr 9, 2024
2 parents 962cef1 + 06823e5 commit f054cd1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gatewayservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY package*.json ./
RUN npm install --ignore-scripts

# Copy the app source code to the working directory
COPY . . /usr/src/gatewayservice/
COPY gateway-service.js ./

# Define the command to run your app
CMD ["node", "gateway-service.js"]
3 changes: 2 additions & 1 deletion questionservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ RUN npm install axios --ignore-scripts
RUN npm install --ignore-scripts

# Copy the app source code to the working directory
COPY . . /usr/src/questionservice/
COPY server.js ./
COPY questions.json ./

# Define the command to run your app
CMD ["node", "server.js"]
4 changes: 3 additions & 1 deletion questionservice/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ app.get('/pregunta', async (req, res) => {
}
// Mezclamos las respuestas
for (let i = answers.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
buf = crypto.randomBytes(1)
randomValue = buf[0]/255
const j = Math.floor(randomValue * (i + 1));
// Intercambiamos las respuestas en los índices i y j
[answers[i], answers[j]] = [answers[j], answers[i]];
}
Expand Down
3 changes: 2 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ sonar.language=js
sonar.projectName=wiq_es05a

sonar.coverage.exclusions=**/*.test.js
sonar.coverage.exclusions=*
sonar.coverage.exclusions=**/*.json, **/*.yaml
sonar.coverage.exclusions=**/Dockerfile, **/*.dockerfile
sonar.sources=webapp/src/components,userservice/authservice,userservice/userservice,gatewayservice,questionservice
sonar.sourceEncoding=UTF-8
sonar.exclusions=node_modules/**
Expand Down
3 changes: 2 additions & 1 deletion userservice/authservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ COPY package*.json ./
RUN npm install --ignore-scripts

# Copy the app source code to the working directory
COPY . . / /usr/src/authservice/
COPY auth-service.js ./
COPY auth-model.js ./

# Expose the port the app runs on
EXPOSE 8002
Expand Down
3 changes: 2 additions & 1 deletion userservice/userservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ COPY package*.json ./
RUN npm install --ignore-scripts

# Copy the app source code to the working directory
COPY . . /usr/src/userservice/
COPY user-service.js ./
COPY user-model.js ./

# Expose the port the app runs on
EXPOSE 8001
Expand Down

0 comments on commit f054cd1

Please sign in to comment.