I have an Java Simple Java HTTPServer running on localhost. I exported my Java application as jar file. And I am running it from console by writing. This java HTTPServer can work on either the nodejs request(from console) or the request from the Postman.users using this system by logging into the system. I am using the user's login information in the database.
How to manage the system in this system. Should I use HTTP Session or do I have a session ID.
The code that the http server stands up to is as follows.
HttpServer server = HttpServer.create(new InetSocketAddress(port), 0);
System.out.println("> Server started at port number: " + port);
server.createContext("/serverStatus", new RootHandler());
server.createContext("/newTransaction", new EchoTransactionHandler());
server.createContext("/", new EchoPostHandler());
server.setExecutor(null);
server.start();
How to handle my problem?