#how to create a java socketserver for a html css js frontend
26 messages · Page 1 of 1 (latest)
You didn't specify what framework you're using so I just defaulted to the industry standard lol
you could go with the raw jakarta websockets or whatever that package is called
oh okay... yeah so then i guess the problem im having is i odnt understnad how to link up the backend with the frontend
in java
sorry i only started doing anything web dev like 4 days ago 💀 i got sockets working with node.js but i dont like using js that much
So you get the general concept of how the client/server interaction works with websockets?
yeah i think so
The client implementation shouldn't differ regardless of whether you're running a Node or Java backend
hmm well, maybe the issue is that since i looked at a tutorial to setu p the backend in node that i dont entirely understand then.
So I'd suggest you start with the backend part first
like just getting that up and running, maybe testing it with a tool like Postman
even though ive already got my frontend set up?
I mean in that case you can just reuse the frontend code
so its the exact same process of setting up a server and setting up websockets like in node
hmm
sorry im really new to webdev
I mean pretty much
im gonna go for a walk and think about it
you install the dependency, set up your websocket handler (aka endpoint)
Java might add some weird ugly OOP stuff around it
but it's just bidirectional JSON really
can i include the .class files in my website the same as .js files?
Java doesn't run in the browser