aboutsummaryrefslogtreecommitdiffstats
path: root/demo-ui/vcpeUiServer.js
diff options
context:
space:
mode:
Diffstat (limited to 'demo-ui/vcpeUiServer.js')
-rw-r--r--demo-ui/vcpeUiServer.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/demo-ui/vcpeUiServer.js b/demo-ui/vcpeUiServer.js
new file mode 100644
index 0000000..94c5b9c
--- /dev/null
+++ b/demo-ui/vcpeUiServer.js
@@ -0,0 +1,19 @@
+// Create express HTTP server app
+var express = require('express');
+var app = express();
+
+var bodyParser = require('body-parser');
+app.use(bodyParser.json());
+app.use(express.static("."));
+
+// defaults
+var PORT = 4000;
+
+// grap the command line arguments
+var args = process.argv.slice(2);
+if ( args[0] ) {
+ PORT = args[0];
+}
+
+app.listen(PORT);
+console.log('Running on http://localhost:' + PORT); \ No newline at end of file