From 9c599ec54eb953ada3586a32e882b793d2dda5bd Mon Sep 17 00:00:00 2001 From: Evandro Junior Date: Wed, 5 Aug 2015 15:04:43 -0300 Subject: [PATCH] fixed to switch easily between api local or from production --- gulpfile.js | 18 ++++++++++++++++++ index.html | 15 ++++++++++++--- js/main.js | 27 +++++++++------------------ 3 files changed, 39 insertions(+), 21 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 65b8aa7..bb4261b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -25,6 +25,7 @@ gulp.task('watch', function () { gulp.watch('./sass/**/*.sass', ['sass']); }); + gulp.task('connect', function() { connect.server({ port: 8080, @@ -33,4 +34,21 @@ gulp.task('connect', function() { }); }); + +gulp.task('connect_api_prod', function(){ + connect.server({ + port: 3001, + root: [__dirname], + livereload: true + }); +}); + +gulp.task('connect_api_local', function(){ + connect.server({ + port: 3002, + root: [__dirname], + livereload: true + }); +}); + gulp.task('default', ['sass','connect','watch']); diff --git a/index.html b/index.html index d832c83..920b66f 100644 --- a/index.html +++ b/index.html @@ -8,9 +8,9 @@ - - - + + +