Reputation: 45
I heard about cherrypy and out of curiosity tried to run this script.
import cherrypy
class HelloWorld(object):
def index(self):
return "Hello World!"
index.exposed = True
cherrypy.quickstart(HelloWorld())
to run this i needed to stop my apache which was already running. after running this for the first time i got the "Hello World" output but now when i am trying to access my localhost:8080 the browser goes into an indefinite long loading state i think their is some conflict between cherrypy and apache or something help me out plz what to do ? Thanks
Upvotes: 0
Views: 921
Reputation: 626
You can define what port CherryPy should listen to.
By issuing cherrypy.config.update() before cherrypy.quickstart(), you can change what port the server listens to. In my example it's 7077.
cherrypy.config.update({'server.socket_port': 7077})
For more information about the configuration of CherryPy, there's this documentation.
Upvotes: 2