I am Hack Sparrow
Captain of the Internets.

How to serve static HTML files in Express.js

Express.js comes with a badass HTML pre-processor, Jade, but sometimes you may just want to use the good old HTML files for whatever reason. Is there a way to accomplish this? Oh yes, there is! The short and quick answer to this requirement is - dump the files in the [obj]public[/obj] directory! There is a slightly more elaborate but cleaner method, which will help you from cluttering up your [obj]public[/obj] directory with the HTML files - use the [obj]static[/obj] middleware. Create ...

Form submission with iframe target opens in a new Window

Give the iframe a name attribute. This is the proper way of submitting a form through a named iframe. [code] <form action="/upload" method="post" enctype="multipart/form-data" target="uploader_iframe"> <input type="file" name="image" /> <input type="submit" /> <iframe id="uiframe" name= ...

.md file – What the heck is it? Should I be scared etc?

Did you download something and find a suspicious looking .md file among the contents? Unless you are into finance, it is a markdown file. A markdown file is just a text file (yes you can open it in any text editor) which has been formatted using the formatting language. Markdown, like HTML, is a markup language, only it is simpler and easier on the human eyes. If you open a .md file in a regular text editor, you are likely t ...