Add local server
TEST=None
BUG=None
Change-Id: Ie4960db1dcb60abde4dadb41b52ecad2d8c7732c
diff --git a/bin/local_server b/bin/local_server
new file mode 100755
index 0000000..67c8a36
--- /dev/null
+++ b/bin/local_server
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+# Copyright 2017 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+"""Runs a local development server."""
+
+import os
+import subprocess
+
+
+def LocalServer():
+ """Starts a local development server with autoreload."""
+ cmd = tuple(
+ 'gunicorn --workers 1 -b :8080 main:app --reload'.split())
+ env = dict(
+ os.environ,
+ CIDB_CRED_DIR='creds/cidb.dbg',
+ DEBUG='True',
+ IS_SERVICE='False')
+ subprocess.call(cmd, env=env)
+
+
+if __name__ == '__main__':
+ LocalServer()