To answer your query, start with opening your terminal and type
npm install -g http-server
Following which please Go to the root folder that you want to serve you files and type:
http-server ./
Finally, do read the output of the terminal and for which something with this line will appear:- http://localhost:8080 will appear.
Everything on there will be allowed to be goten for example:
background: url('http://localhost:8080/waw.png');