mperdeck/jsnlog.js

Extreme trouble configuring jsnlog.js

kevinbcarney opened this issue · 1 comments

Part of my issue is while I'm learning JavaScript, clearly, I'm not a competent yet as it seems I should be.

My goal is to have a server receive log messages from clients, and for now, to log them to a file. Right now, I prefer the files to be human-readable (not JSON).

I'll put my code below, and perhaps someone can tell me what I'm doing wrong.

Right now, the server URL will be "localhost:8081".

The list of stuff I'm not figuring out is long. Here is a short list:

  • Do I use the http.createServer method with .listen to create an HTTP server that listens on port 8081? If not, how do I do this?
  • If I use the http.createServer, the first argument is the request function, that needs to receive messages and send them to the transport. Are there any examples both of functional request functions, and the invoking of them as a parameter to http.createServer?

I know I'll have more questions later, but this will get me started.

i am facing kind of similar issue, where can i mention about the server URL in client side , there is no proper documentation.