Collaborators:
- Paul Ermler
- Maximilian Girt
- Colmán Larkin
- Nataël Baffou
- Dorian Bernard
mvn package
docker-compose up --build
The frontend is accessible at localhost:3000
- brew tap mongodb/brew
- brew install mongodb-community
- this installed mongodb-community 7.0.2
- this is crucial for MongoDB to persist data across restarts
- when you start mongodb it will look for a /data/db directory
- sudo mkdir -p /System/Volumes/Data/data/db
- sudo chown -R $(whoami) /System/Volumes/Data/data/db
- brew services start mongodb-community
- brew services list
- should see mongodb-community listed with status started
- mongosh
- this will connect to the local MongoDB instance
- if you cannot enter command, please try updating your path variable in your bash profile
- echo 'export PATH="/usr/local/opt/mongodb-community/bin:$PATH"' >> ~/.zshrc
- source ~/.zshrc
- brew services stop mongodb-community
mvn clean install -pl core- it's important to run this command before compiling any other service to ensure that the core module is built first
mvn clean install -pl databasemvn -pl database spring-boot:run
The controllers have been set up to handle all the requests to interact with the database that are needed for the project The implementation of actual code that interacts with the database is in the service implementations The service implementations interact with the correct repository which acts as the data access layer and provides us with default CRUD operations as well as any custom queries we may need The repositories are interfaces that extend the MongoRepository interface which provides us with the default CRUD operations The entities are the schema of the database
We can use these to test the endpoints and make sure they are working properly in the terminal check the controllers in the database for the correct endpoints the entities will have the correct json format for the body of the request
curl -X POST http://localhost:8083/problems \
-H "Content-Type: application/json" \
-d '{
"title": "Sample Problem",
"description": "This is a sample problem description.",
"testCases": [{"input": "test input", "output": "test output"}]
}'
curl -X GET http://localhost:8083/problems
brew install apache-activemqbrew services start activemq
{
"idProblem":1,
"code": "print('hello world hahaha')",
"progLanguage": 0
}
mvn -pl broker spring-boot:runmvn -pl database spring-boot:runmvn exec:java -pl graderJavamvn exec:java -pl graderBrokernpm startin the frontend folder