示例#1
0
文件: cli.py 项目: tangingw/pyp5js
def serve_sketches(host, port, debug):
    """
    Run HTTP server to compile and serve sketches

    Opitionals:
    - host: http server host (defaults to 127.0.0.1)
    - port: listened by the server (defaults to 5000)

    Example:
    $ pyp5js serve
    """

    if not SKETCHBOOK_DIR.exists():
        SKETCHBOOK_DIR.mkdir()

    commands.serve_http(host, port, debug)
示例#2
0
文件: cli.py 项目: jvfe/pyp5js
def serve_sketches(host, port, debug):
    """
    Run HTTP server to compile and serve sketches

    Opitionals:
    - host:
    - port:

    Example:
    $ pyp5js serve
    """

    if not SKETCHBOOK_DIR.exists():
        SKETCHBOOK_DIR.mkdir()

    commands.serve_http(host, port, debug)
示例#3
0
 def tearDown(self):
     if SKETCHBOOK_DIR.exists():
         shutil.rmtree(SKETCHBOOK_DIR)
示例#4
0
 def setUp(self):
     if not SKETCHBOOK_DIR.exists():
         SKETCHBOOK_DIR.mkdir()