in the terminal screenshot, here’s what happened:
i displayed the info of the server test, which is on port 8080 and has two endpoints (since one of them is ‘*’, any endpoint will trigger an action).
after that I set the action of the endpoint ‘*’ (which means all) to be print_payload.
then i started the server, which made it start listening to the listed endpoints on port 8080.
when a POST was sent to the port in the endpoint log, the action print_payload was triggered.
I will now use this to check the payloads from another app of mine, and it’ll allow me to build it ready to ship (instead of for example debug the values with prints or something)
little tweaks
solved a simple bug that was making a infinite loop (main instantiating a class, the class calling another class and the other class asking main for the instance)
Alright I created 3 things here:
plus, I needed a simple error handler so the user could tell whatever he wanted to happen in ensure functions, instead of just hardcoding a throw new IllegalArgumentException().
setting up project, starting with a class for reflection stuff
just doing some research and testing with javalin
setting up things (my first rust project!)
changed a lot of the structure
created the first endpoint
changed from LocalDate and LocalTime to Instant
created insertion method for database
removed some useless code and stuff that didn’t make sense to the project
implemented a simple system with annotations to give IDs to deadline actions, that way the action can be defined easily in the POST and the metadata can be parsed based on the chosen action
structuring server with the main thread
pretty much just added a check for when the user tries to create a new object when he already has created one.
also removed a few debug stuff and added some TODOs
the user can receive the list of changes in the configuration and handle it as soon as it arrives, without to make the software detect the change (with polling for example)
about the other changes, I was creating an instance of the configuration object every time the file was changed, which does not help performance at all. Now I just update the one we already have.
I faced a LOT of errors while coding that.
last devlog I had pretty much all the idea of how I wanted it to be but it wasn’t implemented at all, so I started changing whatever I needed in the code for it to work (such as creating parsing methods, ways to bump Java field’s values into the yml, etc).
now it pretty much works, but I haven’t tried creating dynamic variables of more complex types and I also don’t have a smart way to update THE FILE whenever the user updates the variable, instead of the way around which already works.