I have a small question: Is it possible for the client to communicate with the server using localhost?
I’m trying to do that so to prevent the users from directly accessing the service and use it for free.. So, I’ve wanted to make the client communicate with the localhost (hosted in server).
Additionally, I’m using JavaScript (NodeJS – ExpressJS – NextJS) and Python (Flask)
Main question: Are there any solutions to this? If not, are there alternative ways to prevent users from accessing the service?
I deployed Express.js and Flask, with Express.js handling the API and Flask managing internal tasks like translation. I set up the client to communicate with localhost (where Flask is running) for these internal services. I expected it to work, but it only worked on my local machine.
LunaTech is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1