Most Simple HTTP Server
The Gist Explaining How to Set It Up
Last month I did a coding challenge for an e-commerce company. The challenge required you to do xhr requests across files. Nothing extreme, nothing requiring a database, or a massive framework, but they recommended using MAMP. Never having used MAMP, I did my research and discovered that for the scope of the project it was WAY more robust than necessary. Instead, rather than downloading a massive framework, adding unnecessary files to my file structure, , I ran one line on my command line.
http-server


Then, opening up localhost://8080, I was able to access my index page, and run all the programs necessary.
It’s easy to default to what you know in order to get things up and running, but at some point you’re going to run into the frustration of knowing it can be done more simply. You don’t need to plug your three files (.html, .css, and .js) into a framework just to get the server running, just use npm.
Checkout this gist to see how to set it up.
Have any other genuinely easy ways to set up a simple server? Post it in the comments below.