Serve a Directory with Node.js
As I mentioned in Serve a Directory with Python, sometimes you need a directory to be "served" instead of loading the file://
location within your browser. In the past I would mess around with MAMPStack and swapping out httpdocs
directories, but there are better tools these days.
If you prefer to use Node.js instead of Python, you can use the http-server package:
# Install via shell
npm install http-server -g
# Serve a directory
http-server
# Serve a directory at a specified port
http-server -p 2020
Check out the http-server NPM page to check out specific options, but I wanted to highlight how easy it can be to serve a directory with Node.js. And for JavaScript lovers like me...Node.js is the way to go.
When you say or read "HTML5", you half expect exotic dancers and unicorns to walk into the room to the tune of "I'm Sexy and I Know It." Can you blame us though? We watched the fundamental APIs stagnate for so long that a basic feature...
My trip to Mozilla Summit 2013 was incredible. I've spent so much time focusing on my project that I had lost sight of all of the great work Mozillians were putting out. MozSummit provided the perfect reminder of how brilliant my colleagues are and how much...
WordPress has a nice little effect on the Admin Dashboard where it shows and hides the comment control links when you mouseover and mouseout of the record's container. Here's how to achieve that effect using MooTools or jQuery.
The XHTML
Notice that we place the links into...
Chris Coyier's CSS-Tricks blog is everything mine isn't. Chris' blog is rock star popular, mine is not. Chris prefers jQuery, I prefer MooTools. Chris does posts with practical solutions, I do posts about stupid video-game like effects. If I...