Last Updated: February 25, 2016
·
3.935K
· jcreamer898

simpleHTTPServer for Node.js

Ever just want a quick server for a folder of codez. Say you have a folder with...

/libs/mylib.js
/index.html

In python there's a class called simpleHTTPServer, to do such a thing and now there's a node.js version of that as well.

https://github.com/andrewpthorp/simple-http-server

To install it...

npm -g install simple-http-server

To use it...

cd /dir/with/codez
nserver -p {port}

Now just point your browser to localhost:{port} and that's it!

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside