node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »



Am I the only one who is lazy to install Apache just for testing some HTML or JavaScript code (like XHR) ?


npm install -g localhost-now

By installing this package, you will have the smart command available in your shell / terminal.


localhost [port]

By default, the web server will run on the 1337 port. You can set a custom port by specify the port when you launch the server like for example : localhost 8080.