The backend side of NetworkExplorer - a project that arose out of our Software Engineering subject. Made with Spring Boot
- Maven
- JDK 13+
It is as easy as running ./mvnw install clean
(Linux/MacOS) or .\mvnw install clean
(Windows). The output JAR will be in the target
directory. You can start the spring application with this command: java -jar <path-to-jar> at.networkexplorer.backend.BackendApplication
. Your application.properties
needs to be in the same directiory where you execute the command. An example configuration can be found in the Configuration section.
The complete installation process combined with the frontend can be found here
The setup couldn't be more simple. Just download this repository and open it in IntelliJ
.
For the installation, you first have to resolve all dependencies and then add a configuration file.
When using IntelliJ, you only have to open the project, double click on the pom.xml
and import everything.
On the CLI, you simply have to execute ./mvnw install
(Linux/MacOS) or .\mvnw install
(Windows) in the root folder.
For this part, a resources
folder in the src/main/
directory is needed. In the resources
subdirectory, a application.properties
needs to be created. -- This can also be done with a compiled .jar
by putting the configuration file in the same folder as the .jar
.
Copy and Paste the following into the application.properties
:
server.port=16091
#Maximum file upload
spring.servlet.multipart.max-file-size = <MAX_SIZE>
spring.servlet.multipart.max-request-size = <MAX_SIZE>
#Shared folder
network.path = <SHARED_FOLDER>
#JWT
jwt.secret=<JWT_SECRET>
#PBKDF2
pbkdf2.secret=<PBKDF2_SECRET>
... where ...
MAX_SIZE
is the maximum allowed file size to be uploaded,SHARED_FOLDER
is the absolute path (on your harddrive) that you want to share, (with Windows: make sure to use double backslash!)*_SECRET
are the SECRET keys for JWT generation and password hashing
server.port=16091
#Maximum file upload
spring.servlet.multipart.max-file-size = 1TB
spring.servlet.multipart.max-request-size = 1TB
#Shared folder
network.path = Z:\\Adrian\\Programmieren\\shared
#JWT
jwt.secret=uxzPAdJYWtP3jLRjzMUYsARvVHZrShD7CTJTAsnbpQv
#PBKDF2
pbkdf2.secret=FSnyGauBYK69NZR6ZGa2GTM9QPbnca
The first start of the server requires attention, because you will have to note down the admin password - it can be changed later.
You are done with the backend part now. You may move on to the frontend.
You can test whether the server is started by opening localhost:16091/api/v1/ping
If you forgot to write down the admin password (or forgot it)... no problem! You can easily reset the whole user data.
- Navigate to the root folder of the project and delete
nwexp.json
- Restart the Server
- Note down the new admin password