Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'''simple Hello World which specifies a remote host and port (not localhost) to make use of codio box''' | ||
|
||
import cherrypy | ||
|
||
class HelloWorld(object): | ||
@cherrypy.expose #use cherrypy | ||
@cherrypy.tools.gzip() #use cherrypy configuration tools | ||
def index(self): #method | ||
return "Hello 4009CEM-world!" #returns string (will appear in browser) | ||
|
||
if __name__ == '__main__': | ||
cherrypy.config.update({'server.socket_host': '0.0.0.0'}) #configure host (not 127.0.0.1) | ||
cherrypy.config.update({'server.socket_port': 3000}) #configure port | ||
cherrypy.quickstart(HelloWorld(), '/', {'/': {'tools.gzip.on': True}}) #start application; provide configuration support |
BIN
+20 KB
locations.db
Binary file not shown.