diff --git a/ui/gulpfile.babel.js b/ui/gulpfile.babel.js
index <HASH>..<HASH> 100644
--- a/ui/gulpfile.babel.js
+++ b/ui/gulpfile.babel.js
@@ -175,13 +175,13 @@ gulp.task('watch', cb => {
 });
 
 gulp.task('set-env', function () {
-  if( !process.env.WF_SERVER ){
-    env({
-      vars: {
-        WF_SERVER: 'http://localhost:8080/api/'
-      }
-    })
-  }
+  //Only use localhost if WF_SERVER is not set
+  var wf_server = process.env.WF_SERVER || 'http://localhost:8080/api/';
+  env({
+    vars: {
+      WF_SERVER: wf_server
+    }
+  });
 });
 
 gulp.task('build', cb => {
wf_server variable for npm watch