So I made a HTML page that reads JSON-formatted text file from the server and parse it to use with Google Maps API. (draw some lines on the map, coordinate data recorded in JSON-formatted text)
Now, I'm really new to Node.js, but I heard that it's possible to do async processing with it.
My aim is:
- There will be post request with JSON-formatted data to the server,
- The server reads the data and parse it
- And shows the webpage in real time.
Which means, for every new post request (data send), the page will be refreshed to draw a new lines based on the most recent post request with data.
Now from where I should start with to achieve my goal?
What I tried up to now was, made a server with Node.js that can receive post request and insert the data of post request to the html I made(mentioned at the beginning)
I noticed that if I send any post request, it gives the whole html string as alert(which was intended for knowing what's going on), and the alert string contained that post data. But of course, the page doesn't refresh automatically AND reloading the webpage would reset the post data.