Skip to content

Commit

Permalink
Single request
Browse files Browse the repository at this point in the history
  • Loading branch information
uo288347 committed Feb 25, 2024
1 parent ef2707f commit 11c2c61
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions questiongeneration/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const express = require('express');
const axios = require('axios');
const cors = require('cors');
const fs = require('fs');
const { option4 } = require('./readFromFile.js');

const app = express();
const port = 8010;
Expand Down Expand Up @@ -172,8 +170,7 @@ async function ciudadRandom() {

app.get('/question', async (_req, res) => {
try {
//await option3(_req, res);
option4();
await option3(_req, res);
} catch (error) {
console.error(error);
res.status(500).json({ error: 'Error al procesar la solicitud' });
Expand All @@ -182,7 +179,7 @@ async function ciudadRandom() {

// Start the gateway service
const server = app.listen(port, () => {
console.log(`Question Generation Service listening at http://localhost:${port}`);
console.log(`Question Generation Service listening at http://localhost:${port}/question`);
});

module.exports = server
Expand Down

0 comments on commit 11c2c61

Please sign in to comment.