# Import your application as:
# from app import application
# Example:

from pot import pot

# Import CherryPy
import cherrypy
from cherrypy.process.plugins import Daemonizer
Daemonizer(cherrypy.engine).subscribe()



if __name__ == '__main__':

    # Mount the application
    cherrypy.tree.graft(pot, "/")

    # Unsubscribe the default server
    cherrypy.server.unsubscribe()

    # Instantiate a new server object
    server = cherrypy._cpserver.Server()

    # Configure the server object
    server.socket_host = "0.0.0.0"
    server.socket_port = 80
    server.thread_pool = 30

    # For SSL Support
    # server.ssl_module            = 'pyopenssl'
    # server.ssl_certificate       = 'ssl/certificate.crt'
    # server.ssl_private_key       = 'ssl/private.key'
    # server.ssl_certificate_chain = 'ssl/bundle.crt'

    # Subscribe this server
    server.subscribe()

    # Start the server engine (Option 1 *and* 2)

    cherrypy.engine.start()
    cherrypy.engine.block()

@@ -1,114 +1,23 @@
-# Import your application as:%0A# from app import application%0A# Example:%0A%0Afrom pot import pot%0A%0A# Import CherryPy
+from pot import pot
 %0Aimp
@@ -77,16 +77,48 @@
 monizer%0A
+# add pot service in background%0A
 Daemoniz
@@ -247,45 +247,8 @@
 %22)%0A%0A
-    # Unsubscribe the default server%0A
     
@@ -362,42 +362,8 @@
 ()%0A%0A
-    # Configure the server object%0A
     
@@ -458,344 +458,27 @@
     
-# For SSL Support%0A    # server.ssl_module            = 'pyopenssl'%0A    # server.ssl_certificate       = 'ssl/certificate.crt'%0A    # server.ssl_private_key       = 'ssl/private.key'%0A    # server.ssl_certificate_chain = 'ssl/bundle.crt'%0A%0A    # Subscribe this server%0A    server.subscribe()%0A%0A    # Start the server engine (Option 1 *and* 2)
+server.subscribe()%0A
 %0A%0A  

fix pot server.py