Use ejs for templating and provide a custom 404 page. Thanks @ved_a.