Skip to content

Commit

Permalink
Revert to e091bac
Browse files Browse the repository at this point in the history
  • Loading branch information
Santiago21112001 committed Feb 19, 2024
1 parent 1b8c833 commit 8751f79
Show file tree
Hide file tree
Showing 23 changed files with 8 additions and 1,118 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
coverage
docs/build
.idea/
.vscode
.idea/
4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

11 changes: 1 addition & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
- mynetwork
environment:
MONGODB_URI: mongodb://mongodb:27017/userdb

userservice:
container_name: userservice-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/userservice:latest
Expand Down Expand Up @@ -53,18 +53,9 @@ services:
networks:
- mynetwork
environment:
GENERATE_SERVICE_URL: http://questionservice:8003
AUTH_SERVICE_URL: http://authservice:8002
USER_SERVICE_URL: http://userservice:8001

questionservice:
container_name: questionservice-${teamname:-defaultASW}
build: ./questionservice
ports:
- "8003:8003"
networks:
- mynetwork

webapp:
container_name: webapp-${teamname:-defaultASW}
image: ghcr.io/arquisoft/wiq_0/webapp:latest
Expand Down
16 changes: 0 additions & 16 deletions gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const port = 8000;

const authServiceUrl = process.env.AUTH_SERVICE_URL || 'http://localhost:8002';
const userServiceUrl = process.env.USER_SERVICE_URL || 'http://localhost:8001';
const generateServiceURL = process.env.GENERATE_SERVICE_URL || 'http://localhost:8003';

app.use(cors());
app.use(express.json());
Expand Down Expand Up @@ -42,21 +41,6 @@ app.post('/adduser', async (req, res) => {
}
});

app.post('/generatequestion', async(req,res)=> {
try{
// Redirige la solicitud al servicio de generación de preguntas sin enviar un cuerpo de solicitud.
const response = await axios.post(`${generateServiceURL}/generatequestion`);

// Devuelve la respuesta del servicio de generación de preguntas al cliente original.
res.json(response.data);

} catch(error) {
res.status(error.response.status).json({ error: error.response.data.error });
}
});



// Start the gateway service
const server = app.listen(port, () => {
console.log(`Gateway Service listening at http://localhost:${port}`);
Expand Down
6 changes: 0 additions & 6 deletions package-lock.json

This file was deleted.

2 changes: 0 additions & 2 deletions questionservice/.dockerignore

This file was deleted.

20 changes: 0 additions & 20 deletions questionservice/Dockerfile

This file was deleted.

Loading

0 comments on commit 8751f79

Please sign in to comment.