diff --git a/gatewayservice/Dockerfile b/gatewayservice/Dockerfile index 7c030c37..f349f043 100644 --- a/gatewayservice/Dockerfile +++ b/gatewayservice/Dockerfile @@ -13,5 +13,8 @@ RUN npm install --ignore-scripts # Copy the app source code to the working directory COPY . . +ARG API_ORIGIN_URI="http://localhost:3000" +ENV REACT_APP_API_ORIGIN_ENDPOINT=$API_ORIGIN_URI + # Define the command to run your app CMD ["node", "gateway-service.js"] diff --git a/questions/creationservice/creation-service.js b/questions/creationservice/creation-service.js index b67b2a5d..e14b3e5f 100644 --- a/questions/creationservice/creation-service.js +++ b/questions/creationservice/creation-service.js @@ -1,6 +1,7 @@ const express = require('express'); const mongoose = require('mongoose'); const fetch = require('node-fetch'); +const crypto = require('crypto'); const Question = require('./creation-model'); const app = express(); @@ -37,7 +38,8 @@ function getQuestionInfo(info){ // Select 4 random rows of the data for (let i = 0; i