diff --git a/client/gulp/config.js b/client/gulp/config.js index 481c1b5f..a142e407 100644 --- a/client/gulp/config.js +++ b/client/gulp/config.js @@ -5,22 +5,17 @@ module.exports = { 'serverport': 3000, 'scripts': { - 'src': './src/**/*.js', + 'src': './src/*.js', 'dest': './build/js/' }, - 'phpserver': { - 'base': './src/server/', - 'port': 8000 - }, - 'images': { 'src': './src/assets/images/**/*.{jpeg,jpg,png}', 'dest': './build/images/' }, 'styles': { - 'src': './src/**/*.scss', + 'src': './src/*.scss', 'dest': './build/css/' }, diff --git a/client/gulp/tasks/serverphp.js b/client/gulp/tasks/serverphp.js deleted file mode 100644 index ea36f95f..00000000 --- a/client/gulp/tasks/serverphp.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var config = require('../config'); -var gulp = require('gulp'); -var connect = require('gulp-connect-php'); - -gulp.task('serverphp', function() { - //connect.server(config.phpserver); -}); diff --git a/client/src/config.js b/client/src/config.js new file mode 100644 index 00000000..e206592e --- /dev/null +++ b/client/src/config.js @@ -0,0 +1,2 @@ +root = 'http://localhost:3000'; +apiRoot = 'http://localhost:3000/api'; diff --git a/client/src/index.html b/client/src/index.html index d6e6adbb..a398c80c 100644 --- a/client/src/index.html +++ b/client/src/index.html @@ -14,6 +14,7 @@
+ diff --git a/client/src/lib-app/api-call.js b/client/src/lib-app/api-call.js index b20cf618..1e61dc52 100644 --- a/client/src/lib-app/api-call.js +++ b/client/src/lib-app/api-call.js @@ -2,9 +2,6 @@ const _ = require('lodash'); const APIUtils = require('lib-core/APIUtils'); const SessionStore = require('lib-app/session-store'); -const url = 'http://localhost:3000'; -const apiUrl = 'http://localhost:3000/api'; - function processData (data, dataAsForm = false) { let newData; @@ -31,7 +28,7 @@ module.exports = { call: function ({path, data, plain, dataAsForm}) { console.log('request ' + path, data); return new Promise(function (resolve, reject) { - APIUtils.post(apiUrl + path, processData(data, dataAsForm), dataAsForm) + APIUtils.post(apiRoot + path, processData(data, dataAsForm), dataAsForm) .then(function (result) { console.log(result); @@ -53,14 +50,14 @@ module.exports = { }, getFileLink(filePath) { - return apiUrl + '/system/download?file=' + filePath; + return apiRoot + '/system/download?file=' + filePath; }, getAPIUrl() { - return apiUrl; + return apiRoot; }, getURL() { - return url; + return root; } }; \ No newline at end of file