Main method generation for web app