1 #!/usr/bin/env python 2 # Copyright 2014 The Chromium Authors. All rights reserved. 3 # Use of this source code is governed by a BSD-style license that can be 4 # found in the LICENSE file. 5 """Starts the mojo spy dev server. 6 7 During normal usage of mojo spy, the spy files are compiled into standalone 8 HTML+JS+CSS snippets that are then embedded in the mojo shell. 9 10 The dev server allows edit-reload style development of the spy UI in isolation 11 of the c++ bits. To use, start the dev server, navigate to the URL the script 12 prints, and run any of the tests listed. Reloading in the browser loads the 13 latest content from disk, enabling a traditional web development workflow. 14 """ 15 import sys 16 17 from ui import dev_server 18 19 COMPONENTS_PORT = 8015 20 21 if __name__ == '__main__': 22 sys.exit(dev_server.Main(COMPONENTS_PORT, sys.argv[1:])) 23