[CORD-873] CRUD for Core and Service model from Chameleon
Change-Id: I45c533feba6720b82de3681d862773047e7fd6f8
diff --git a/conf/app/app.config.dev.js b/conf/app/app.config.dev.js
index 5c620d7..1b74b5d 100644
--- a/conf/app/app.config.dev.js
+++ b/conf/app/app.config.dev.js
@@ -1,5 +1,5 @@
 angular.module('app')
   .constant('AppConfig', {
-    apiEndpoint: 'http://xos.dev:3000/api',
-    websocketClient: 'http://xos.dev:3000'
+    apiEndpoint: '/xosapi/v1',
+    websocketClient: 'http://xos.dev'
   });
diff --git a/conf/app/style.config.cord.js b/conf/app/style.config.cord.js
index 6f7ebab..9419489 100644
--- a/conf/app/style.config.cord.js
+++ b/conf/app/style.config.cord.js
@@ -8,15 +8,15 @@
     routes: [
         {
             label: 'Slices',
-            state: 'xos.core.slices'
+            state: 'xos.core.slice'
         },
         {
             label: 'Instances',
-            state: 'xos.core.instances'
+            state: 'xos.core.instance'
         },
         {
             label: 'Nodes',
-            state: 'xos.core.nodes'
+            state: 'xos.core.node'
         }
     ]
 });
diff --git a/conf/app/style.config.opencloud.js b/conf/app/style.config.opencloud.js
index 9693c5d..5a23a77 100644
--- a/conf/app/style.config.opencloud.js
+++ b/conf/app/style.config.opencloud.js
@@ -8,7 +8,7 @@
     routes: [
         {
             label: 'Slices',
-            state: 'xos.core.slices'
+            state: 'xos.core.slice'
         }
     ]
 });
diff --git a/conf/browsersync.conf.js b/conf/browsersync.conf.js
index 49936d4..e8c38fa 100644
--- a/conf/browsersync.conf.js
+++ b/conf/browsersync.conf.js
@@ -1,4 +1,18 @@
 const conf = require('./gulp.conf');
+const httpProxy = require('http-proxy');
+
+// TODO move the proxy config in a separate file and share with browsersync.dist.js
+
+const proxy = httpProxy.createProxyServer({
+  target: 'http://xos.dev:9101'
+});
+
+proxy.on('error', function(error, req, res) {
+  res.writeHead(500, {
+    'Content-Type': 'text/plain'
+  });
+  console.error('[Proxy]', error);
+});
 
 module.exports = function () {
   return {
@@ -6,8 +20,16 @@
       baseDir: [
         conf.paths.tmp,
         conf.paths.src
-      ]
+      ],
+      middleware: function(req, res, next){
+        if (req.url.indexOf('xosapi') !== -1) {
+          proxy.web(req, res);
+        }
+        else{
+          next();
+        }
+      }
     },
-    open: false
+    open: true
   };
 };