mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Add a "ping" handler.
This commit is contained in:
parent
457a842cec
commit
e120c43663
@ -12,9 +12,11 @@ import cherrypy
|
|||||||
from time import time,ctime
|
from time import time,ctime
|
||||||
|
|
||||||
|
|
||||||
# This is the main application class that we'll run under CherryPy. For now,
|
# This is the main application class that we'll run under CherryPy.
|
||||||
# we'll just output some basic HTML so we can see that everything is running.
|
|
||||||
class pgAdmin4(object):
|
class pgAdmin4(object):
|
||||||
|
|
||||||
|
# The main index page
|
||||||
|
@cherrypy.expose
|
||||||
def index(self):
|
def index(self):
|
||||||
output = """
|
output = """
|
||||||
Today is <b>%s</b>
|
Today is <b>%s</b>
|
||||||
@ -25,7 +27,11 @@ Today is <b>%s</b>
|
|||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
index.exposed = True
|
|
||||||
|
# A special URL used to "ping" the server
|
||||||
|
@cherrypy.expose
|
||||||
|
def ping(self):
|
||||||
|
return "PING"
|
||||||
|
|
||||||
|
|
||||||
# Start the web server. The port number should have already been set by the
|
# Start the web server. The port number should have already been set by the
|
||||||
|
Loading…
Reference in New Issue
Block a user