• Express.js: Custom 404 and 500 error pages

    How to create custom Express.js error pages Express does a good job of handling 404 and 500 errors by default. However, many a times, the error is page is now what we would like it to look like. Is t...

  • Express.js: Serving static HTML files

    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 wa...

  • vhost in Express.js

    Wondering how to replicate the Apache vhost feature in Express.js? In case you are new to vhost, it allows a web server to listen on a single port and serve different web apps depending on the domain...

  • Express.js HTTPS server

    How to setup an HTTPS Express.js server

  • Express.js: Forward to non-www or www domain name

    How to forward non-www to www domain name and vice-versa Forwarding domain names according to the requirements of 'www' is trivial in Apache using .htaccess. It's not hard either in Node.js, if you a...

  • Disabling the context menu using JavaScript

    How to disable the browser rightclick menu One may want to disable the right click context menu on a webpage for various reason. It could be to show a custom context menu or to prevent images from be...