forked from Arquisoft/wiq_0
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #158 from Arquisoft/users_info_api
- Loading branch information
Showing
12 changed files
with
33,141 additions
and
18,465 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,10 +1,10 @@ | ||
{ | ||
"dependencies": { | ||
"chart.js": "^4.4.1", | ||
"node": "^18.20.1", | ||
"react-chartjs-2": "^5.2.0" | ||
}, | ||
"devDependencies": { | ||
"serve": "^14.2.1" | ||
} | ||
} | ||
|
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,21 +1,35 @@ | ||
const { MongoMemoryServer } = require('mongodb-memory-server'); | ||
const { default: mongoose } = require('mongoose'); | ||
|
||
|
||
let mongoserver; | ||
let userservice; | ||
let authservice; | ||
let gatewayservice; | ||
let questionservice; | ||
let questiongenerationservice; | ||
let gameservice; | ||
|
||
async function startServer() { | ||
console.log('Starting MongoDB memory server...'); | ||
mongoserver = await MongoMemoryServer.create(); | ||
const mongoUri = mongoserver.getUri(); | ||
process.env.MONGODB_URI = mongoUri; | ||
const connection = await mongoose.createConnection(mongoUri); | ||
const User = await require('../../users/userservice/user-model')(connection); | ||
userservice = await require("../../users/userservice/user-service"); | ||
authservice = await require("../../users/authservice/auth-service"); | ||
gatewayservice = await require("../../gatewayservice/gateway-service"); | ||
questionservice = await require("../../questionservice/question-service"); | ||
questiongenerationservice = await require("../../question_generator/questionGenerationService"); | ||
gameservice = await require("../../gameservice/game-service"); | ||
// Add a user to the database | ||
await User.create({ | ||
username: 'defaultuser', | ||
password: 'defaultpassword', | ||
profileImage: 'default.jpg', | ||
}); | ||
|
||
} | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
Oops, something went wrong.