Skip to content

Commit

Permalink
Now launching webapp during e2e test environment setup
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAlvrz committed Apr 9, 2024
1 parent 33e367d commit 3353475
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions webapp/e2e/test-environment-setup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { MongoMemoryServer } = require('mongodb-memory-server');
const testUtils = require('./testUtils.js');
const axios = require('axios');
const exec = require('child_process').exec;


let mongoserver;
Expand All @@ -16,6 +17,16 @@ async function startServer() {
const mongoUri = mongoserver.getUri();
process.env.MONGODB_URI = mongoUri;

//Start webapp
console.log('Starting react app.');
exec('npm start', (err, stdout, stderr) => {
if (err) {
console.error(err);
return;
}
console.log(stdout);
});

userservice = await require("../../users/userservice/user-service");
authservice = await require("../../users/authservice/auth-service");
gatewayservice = await require("../../gatewayservice/gateway-service");
Expand Down

0 comments on commit 3353475

Please sign in to comment.