A lot of times you want to run a simple web server from the current path. Whether it be to see how javascript behaves or if you have linked things right in an html file. A quick tip is to install an npm package called http-server (the clue is in the name!)
Installation is pretty simple, by the usual npm route:
npm install http-server -g
And then you just have to go to the folder you want to serve files from and do:
node bin/http-server
or the following just worked for me:
http-server
Hope that helps!
Tweet
comments powered by Disqus