Index: buildhelpers/codegen/templates/__main__.mustache
===================================================================
--- buildhelpers/codegen/templates/__main__.mustache	(revision 43fd35cf3f21ed781b31e4e1056072bbeced8e55)
+++ buildhelpers/codegen/templates/__main__.mustache	(revision 43fd35cf3f21ed781b31e4e1056072bbeced8e55)
@@ -0,0 +1,19 @@
+{{#supportPython2}}
+#!/usr/bin/env python
+{{/supportPython2}}
+{{^supportPython2}}
+#!/usr/bin/env python3
+{{/supportPython2}}
+
+import os
+
+from {{packageName}}_impl import (
+    app, application, mail, celery, setup_app, config_object
+)
+
+def main():
+	setup_app('{{appName}}', config_object, template_folder = os.path.join(os.path.dirname(__file__), 'templates'))
+	app.run(host=application.config.get("HOST", "localhost"), port=application.config.get("PORT", {{serverPort}}))
+
+if __name__ == '__main__':
+	main()
