Answer the question
In order to leave comments, you need to log in
How to make friends backend (java) and front Angular?
Hello! They sent me a test. The bottom line: make a small application in Angular using a ready-made API in Java. I already wrote the client. But I can't connect with the backend. The backend starts on localhost:8080
The problem is that $http.post() and $http.get() do not work with the backend. Interestingly, the request seems to leave, but the parameters are not transmitted, and there is no answer, as it were. But if you send a request to the port where the front with angular lies, then JSON parameters are transmitted, everything is as it should. I suspect that the problem is in the ports. Of the Java files, only one jar file and that's it. And some folder tomcat.8080 is also created. Does anyone know how to tie them together? I recently did something similar in Ruby - no problem at all. And here is an ambush. Even xs what to think. Faced Java for the first time.
Answer the question
In order to leave comments, you need to log in
I can imagine what a mess in your head) The most obvious and simple solution is to use the Spring framework tyts1 tyts 2 . If you do not want to use frameworks, then you can immediately write a couple of servlets to process your requests
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question