generated from Arquisoft/wiq_0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
478a7f4
commit 08f8456
Showing
3 changed files
with
20 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
const { MongoMemoryServer } = require('mongodb-memory-server'); | ||
|
||
import { MongoMemoryServer } from 'mongodb-memory-server'; | ||
|
||
let mongoserver; | ||
let userservice; | ||
let authservice; | ||
let gatewayservice; | ||
|
||
async function startServer() { | ||
console.log('Starting MongoDB memory server...'); | ||
mongoserver = await MongoMemoryServer.create(); | ||
const mongoUri = mongoserver.getUri(); | ||
process.env.MONGODB_URI = mongoUri; | ||
userservice = await require("../../users/userservice/user-service"); | ||
authservice = await require("../../users/authservice/auth-service"); | ||
gatewayservice = await require("../../gatewayservice/gateway-service"); | ||
} | ||
console.log('Starting MongoDB memory server...'); | ||
mongoserver = await MongoMemoryServer.create(); | ||
const mongoUri = mongoserver.getUri(); | ||
process.env.MONGODB_URI = mongoUri; | ||
|
||
userservice = (await import('../../users/userservice/user-service')).default; | ||
authservice = (await import('../../users/authservice/auth-service')).default; | ||
gatewayservice = (await import('../../gatewayservice/gateway-service')) | ||
.default; | ||
} | ||
|
||
startServer(); | ||
startServer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters