Skip to content

The backend & web frontend for the software testing & debugging game "Sojourner under Sabotage", implemented using Java Spring Boot, JPA, in-memory compiler, monaco code editor

Notifications You must be signed in to change notification settings

se2p/Sojourner-under-Sabotage-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sojourner under Sabotage - Server

Create the Unity build

Build the Unity project with WebGL as the target platform. Use /src/main/resources/static/unity/ as build output directory.
The source code or a prebuilt export can be found in the Sojourner-under-Sabotage-Game repository.

Webpack Install and Build

  • switch to /src/main/js/
  • install dependencies npm install
  • execute webpack npm run build

Install and Run the Server

  • Install dependencies mvn install
  • Rename example.application.properties to application.properties and add your database credentials
  • Run the application mvn spring-boot:run

Now the server runs and the frontend can be accessed at the port configured in the application.properties.

Common Deployment Errors and Solutions

  • Duplicate mapping after renaming/moving a controller ➡ mvn clean
  • Package org.junit.jupiter.api does not exist ➡ update the jarsToInclude setting in the application.properties
  • The localhost.date.log file is nearly empty ➡ look into catalina.out

Test the API

curl localhost:8080/api/hello -i
curl -H "Accept: application/json" -H "Content-Type: application/json" -X POST localhost:8080/api/auth -d  "{\"login\":\"user@mail.com\",\"password\":\"1234\"} -i
curl -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d "{\"className\":\"DemoTest\",\"sourceCode\":\"public class DemoTest{@org.junit.Test public void testDemoAddition(){org.junit.Assert.assertEquals(3, Demo.add(2, 1));}}\",\"cutComponentName\":\"Demo\"}" -i -H "Authorization: Bearer insert_valid_token_here" localhost:8080/api/execute

About

The backend & web frontend for the software testing & debugging game "Sojourner under Sabotage", implemented using Java Spring Boot, JPA, in-memory compiler, monaco code editor

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published