How to POST data on a local website?

I just finished the Javascript track and was trying to build a static html site that sends the users first and last name with POST. I tried using http-server from node.js to locally host the site but I could not figure out what the url link would be for the POST (I tried creating a db.json and that didn’t work). Can anyone point me to the right direction for the URL of a post, do I need to host my site online to do this?